Andy Gilbert Posted March 8, 2013 Share Posted March 8, 2013 Can someone confirm if im doing this correct as im not having much luck. So my understanding is: self.entity.animationmanager:SetAnimationSequence(4,0.1,200,1,self,self:AniSeq1()) Would then call: function Script:AniSeq1() self.currentState = self.sequence.idle end when the sequence 4 gets to the end? For some reason this seems to get called very early on inthe sequence, if i remove the hook from the call, so: self.entity.animationmanager:SetAnimationSequence(4,0.1,200) the animation plays fine, but obviously loops, which isnt what i want, i want it to change to a different sequence once its finished sequence 4. Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Andy Gilbert Posted March 8, 2013 Author Share Posted March 8, 2013 Somtimes you need a little but longer at it! Ive done it, just for record it was down to 2 things, mainly i was calling the following every update: self.entity.animationmanager:SetAnimationSequence(4,0.1,200,1,self,self:AniSeq1()) and also changed to self.entity.animationmanager:SetAnimationSequence(4,0.1,200,1,self,self.AniSeq1) Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Rick Posted March 8, 2013 Share Posted March 8, 2013 I often find a special frame hook to be helpful as well to get more accurate timing on when an attack actually lands and when to calc and show the damage done. This would be more for RPG type games with slower melee attacks and spells. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 9, 2013 Share Posted March 9, 2013 What is hook or endhook ? (I just see a call to a function) Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted March 9, 2013 Share Posted March 9, 2013 That's really all a hook is. A call to a function. It's just having the engine call your user function in specific situations. Quote Link to comment Share on other sites More sharing options...
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.