I am trying to add a cow to my mod I have downloaded one from turbosquid that is animated it looks like the one that starvation used but once I try to spawn the cow I get an error saying object has no reference.
<entity_class name="animalCow" extends="animalTemplateTimid">
<property name="HasRagdoll" value="true" />
<property name="Mesh" value="#Cow?Cow" />
<property name="ModelType" value="Standard" />
<property name="Prefab" value="NPC" />
<property name="Parent" value="Animals" />
<property name="AvatarController" value="AnimationSDX, Mods" />
<property name="Weight" value="70" />
<property name="RotateToGround" value="true" />
<property name="IsEntityAnimal" value="true" />
<property name="PhysicsBody" value="Stag" />
<property name="Faction" value="animals" />
<property name="CanClimbLadders" value="false" />
<property name="MaxHealth" value="50" />
<property name="MaxViewAngle" value="180" />
<property name="WanderSpeed" value="0.7" />
<property name="PanicSpeed" value="2.0" />
<property name="SurfaceCategory" value="organic" />
<property name="ParticleOnDeath" value="blood_death" />
<property name="SoundHurt" value="Animals/stagpain" />
<property name="SoundDeath" value="Animals/stagdeath" />
<property name="TimeStayAfterDeath" value="300" />
<property name="IsEnemyEntity" value="false" />
<property name="ExperienceGain" value="327" />
<property name="HasRagdoll" value="true" />
<drop event="Harvest" name="rawMeat" tool_category="Butcher" count="6" />
<drop event="Harvest" name="animalHide" tool_category="Butcher" count="9" />
<drop event="Harvest" name="animalFat" tool_category="Butcher" count="4" />
<drop event="Harvest" name="femur" tool_category="Butcher" count="2" />
</entity_class>
this is from the output
NullReferenceException: Object reference not set to an instance of an object
at GameObjectAnimalAnimation.IsAnimationAttackPlaying () [0x00000] in <filename unknown>:0
at EntityAlive.get_RightArmAnimationAttack () [0x00000] in <filename unknown>:0
at NetPackagePlayerStats..ctor (.EntityAlive _entity) [0x00000] in <filename unknown>:0
at NetEntityDistributionEntry.updatePlayerList (System.Collections.Generic.List`1 _playerList) [0x00000] in <filename unknown>:0
at NetEntityDistribution.OnUpdateEntities () [0x00000] in <filename unknown>:0
at GameManager.JQ () [0x00000] in <filename unknown>:0
at GameManager.Update () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
and I took your advice and sposted in the SDX fourm
<entity_class name="animalCow" extends="animalTemplateTimid">
<property name="HasRagdoll" value="true" />
<property name="Mesh" value="#Cow?Cow" />
<property name="ModelType" value="Standard" />
<property name="Prefab" value="NPC" />
<property name="Parent" value="Animals" />
<property name="AvatarController" value="AnimationSDX, Mods" />
<property name="Weight" value="70" />
<property name="RotateToGround" value="true" />
<property name="IsEntityAnimal" value="true" />
<property name="PhysicsBody" value="Stag" />
<property name="Faction" value="animals" />
<property name="CanClimbLadders" value="false" />
<property name="MaxHealth" value="50" />
<property name="MaxViewAngle" value="180" />
<property name="WanderSpeed" value="0.7" />
<property name="PanicSpeed" value="2.0" />
<property name="SurfaceCategory" value="organic" />
<property name="ParticleOnDeath" value="blood_death" />
<property name="SoundHurt" value="Animals/stagpain" />
<property name="SoundDeath" value="Animals/stagdeath" />
<property name="TimeStayAfterDeath" value="300" />
<property name="IsEnemyEntity" value="false" />
<property name="ExperienceGain" value="327" />
<property name="HasRagdoll" value="true" />
<drop event="Harvest" name="rawMeat" tool_category="Butcher" count="6" />
<drop event="Harvest" name="animalHide" tool_category="Butcher" count="9" />
<drop event="Harvest" name="animalFat" tool_category="Butcher" count="4" />
<drop event="Harvest" name="femur" tool_category="Butcher" count="2" />
</entity_class>
this is from the output
NullReferenceException: Object reference not set to an instance of an object
at GameObjectAnimalAnimation.IsAnimationAttackPlaying () [0x00000] in <filename unknown>:0
at EntityAlive.get_RightArmAnimationAttack () [0x00000] in <filename unknown>:0
at NetPackagePlayerStats..ctor (.EntityAlive _entity) [0x00000] in <filename unknown>:0
at NetEntityDistributionEntry.updatePlayerList (System.Collections.Generic.List`1 _playerList) [0x00000] in <filename unknown>:0
at NetEntityDistribution.OnUpdateEntities () [0x00000] in <filename unknown>:0
at GameManager.JQ () [0x00000] in <filename unknown>:0
at GameManager.Update () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
and I took your advice and sposted in the SDX fourm
Last edited by a moderator: