Jump to content

Help Adding in A Cow


Recommended Posts

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" />



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

Link to comment
Share on other sites

I got the AnimationSDX and now I am getting this


Update: Checking if any animations are playing


(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)


is NOT Valid





Link to comment
Share on other sites

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
is NOT Valid


is a generic message, ignore it.


- - - Updated - - -


Also, can't see your pics, use an image host like imgur.com

Link to comment
Share on other sites

Its doubtful that cow has a ragdoll, but you twice say it does. I recommend ragdoll be false. Making a ragdoll is complex, and requires bone mapping and adding rigid bodies to the rigging. I think the model needs to be rigged as humanoid, but not sure about that last part. I'm working on that right now actually.


Your xml also does not reference the animations used, so as SphereII said, follow the tutorials and videos, then if you need help, we are ready to help.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...