tivial01 Posted March 28, 2018 Share Posted March 28, 2018 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 Link to comment Share on other sites More sharing options...
tivial01 Posted March 28, 2018 Author Share Posted March 28, 2018 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 More sharing options...
HAL9000 Posted March 28, 2018 Share Posted March 28, 2018 https://7d2dsdx.github.io/Tutorials/index.html There's a section for animation Link to comment Share on other sites More sharing options...
Guppycur Posted March 28, 2018 Share Posted March 28, 2018 (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 More sharing options...
tivial01 Posted March 28, 2018 Author Share Posted March 28, 2018 So even though it popped up ignore it Link to comment Share on other sites More sharing options...
xyth Posted March 28, 2018 Share Posted March 28, 2018 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 More sharing options...
tivial01 Posted March 28, 2018 Author Share Posted March 28, 2018 I followed the tut on making the goblin The problem I am running into is the animation is named total 001 will the xml be ok with a space Link to comment Share on other sites More sharing options...
Guppycur Posted March 28, 2018 Share Posted March 28, 2018 Yes. Link to comment Share on other sites More sharing options...
xyth Posted March 28, 2018 Share Posted March 28, 2018 I added a ragdoll to a generic model, so as far as Unity is concerned , Generic is fine. However, MecanimSDX isn't very happy about it yet. Link to comment Share on other sites More sharing options...
tivial01 Posted March 28, 2018 Author Share Posted March 28, 2018 Ok so to recap turn rag doll to false and add in the animation to the xml Like this? <property name="AnimationIdel value=" total 001"/> Link to comment Share on other sites More sharing options...
xyth Posted March 28, 2018 Share Posted March 28, 2018 Yes, but exact spelling matters, so it's: <property name="AnimationIdle" value="total 001"/> Link to comment Share on other sites More sharing options...
tivial01 Posted March 28, 2018 Author Share Posted March 28, 2018 Ok thank y'all for all the help I will try it when I get home and let y'all know Link to comment Share on other sites More sharing options...
tivial01 Posted March 29, 2018 Author Share Posted March 29, 2018 Yes, but exact spelling matters, so it's: <property name="AnimationIdle" value="total 001"/> Does it matter where in the code I put it? Link to comment Share on other sites More sharing options...
sphereii Posted March 29, 2018 Share Posted March 29, 2018 Does it matter where in the code I put it? Anywhere in the XML would be fine I normally group the animation groups together for readability. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.