Jump to content

LE3 Animation endhook?


Andy Gilbert
 Share

Recommended Posts

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

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

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

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

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...