DoorCloser Posted January 15, 2014 Posted January 15, 2014 Hi everybody . I've came back to that forum with some more questions. So basiclly thats about animations. I dont know how to make some of these facts: 1. When mob is idle, i want it to like breathing or something, so his arms slowly swinging. ModelBiped does the same thing when stays on one place. If you still dont understand what i mean, please check it out in the game. 2. Living animations. I tried to use IronGolem one's, but it didnt work. It kinda fu** up my mob. So basiclly lets just think its not working how i did that. Maybe there is any tutorials on it, could somebody give a link? That would be awesome. 3. I want my mob to jump on me. So its kinda like the slime, but my mob will have to jump like from 3 blocks distance on me. Just like a HeadCrab, if you know what i mean))) Thats probably all i need to know at the moment. If you know anything about solving those problems, please, reply here. I really need this. But if you know any tutorial on how to make these, please, reply too. It will be so appreciated. Thanks alot if you read that post. That means you want to help me) Quote
Draco18s Posted January 15, 2014 Posted January 15, 2014 Animations are usually just sine / cosine based functions (that's why they cycle) which let the animation look smooth. Reminds me that a mob I have in a mod I stated I would not update until 1.7 was usable: It's based on the wolf (so model, renderer, an entity classes are copied wholesale, then the entity class modified to suit my purposes) and for some reason the tail just spins in a circle, passing through the dog's back and belly. When I first saw it happening I went, "Sigh. I really don't want to figure out why that's happening" because I hadn't made any changes to the render classes other than to change texture, and really really didn't want to work out the trig manually. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
DoorCloser Posted January 16, 2014 Author Posted January 16, 2014 You found the solutions already yourself: 1. Look at ModelBiped 2. Look at the Iron Golem 3. Look at slimes Animations are usually just sine / cosine based functions (that's why they cycle) which let the animation look smooth. I wouldnt put the post here if i havent tried that out. I dont know, but Iron Golem's codes not working on my mob. I basicly changed what i need, and it still doesnt work. I think thats the Iron Golem's string where he suppose to do an attack animations: public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { EntityIronGolem entityirongolem = (EntityIronGolem)par1EntityLiving; int i = entityirongolem.getAttackTimer(); if (i > 0) { this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); } else { int j = entityirongolem.getHoldRoseTick(); if (j > 0) { this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F); this.ironGolemLeftArm.rotateAngleX = 0.0F; } else { this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(par2, 13.0F)) * par3; this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(par2, 13.0F)) * par3; } } I used only getAttackTimer one, i removed stuff about holding rose.I tried to change values, all variables was fine. Names was correct, still doesnt work. It has no errors, but limbs of my mob doesnt work. Here is the remaded code of this: public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { EntityBullsquid entitybullsquid = (EntityBullsquid) par1EntityLiving; int i = entitybullsquid.getAttackTimer(); if (i > 0) { this.claw_1.rotateAngleY = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F); this.claw2.rotateAngleY = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F); } } Whats wrong with it? Why not correct? Help? Quote
coolboy4531 Posted January 17, 2014 Posted January 17, 2014 I don't think: public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { EntityIronGolem entityirongolem = (EntityIronGolem)par1EntityLiving; int i = entityirongolem.getAttackTimer(); if (i > 0) { this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); } else { int j = entityirongolem.getHoldRoseTick(); if (j > 0) { this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F); this.ironGolemLeftArm.rotateAngleX = 0.0F; } else { this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(par2, 13.0F)) * par3; this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(par2, 13.0F)) * par3; } } is actually changing your mod. You are changing EntityIronGolem not your own entity. If you want to use the EntityIronGolem code, you need to change the coding to match your entity, not the Iron Golem's. Quote
DoorCloser Posted February 7, 2014 Author Posted February 7, 2014 I don't think: public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { EntityIronGolem entityirongolem = (EntityIronGolem)par1EntityLiving; int i = entityirongolem.getAttackTimer(); if (i > 0) { this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F); } else { int j = entityirongolem.getHoldRoseTick(); if (j > 0) { this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F); this.ironGolemLeftArm.rotateAngleX = 0.0F; } else { this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(par2, 13.0F)) * par3; this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(par2, 13.0F)) * par3; } } is actually changing your mod. You are changing EntityIronGolem not your own entity. If you want to use the EntityIronGolem code, you need to change the coding to match your entity, not the Iron Golem's. Ofcourse i did, i've posted exactly Golem's code here. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.