Hi, hoping someone can help explain how to go about detecting that a non-looping animation has completed? eg to make the game wait for completion before moving a character etc.
I've found some comments around a CreatureAgent.AnimationReachedEnd. Not sure if this is what i'm looking for? I tried attaching it to the renderer along with CreatureGameController and having AnimationReachedEnd print a message but couldn't get it to work.
I couldn't find any documentation/resource or forum post that explains how to do this or set it up. The existing documentation is great for 'how to do certain things' but is there a more basic but comprehensive scripting guide anywhere?
Many thanks!
How to detect an animation has completed? Also is there a more complete scripting documentation anywhere?
Re: How to detect an animation has completed? Also is there a more complete scripting documentation anywhere?
Hello,
You can take a look here as a referenced:
https://github.com/kestrelm/Creature_Un ... le.cs#L419
You can put some printouts there and trace through the code to see if it hits the end call.
Thanks
You can take a look here as a referenced:
https://github.com/kestrelm/Creature_Un ... le.cs#L419
You can put some printouts there and trace through the code to see if it hits the end call.
Thanks
Re: How to detect an animation has completed? Also is there a more complete scripting documentation anywhere?
Thanks will try that out! I'm also seeing if an event trigger will suit my situation.
I've got the event in the creature meta which is added to the object as json. Trying to understand how to use the gamecontroller eventtrigger though. Is there anywhere that gives a really basic example? Everything seems to say go and read the unity docs on events/delegates, but i'm just hoping to see a super basic example of what this might look like using the creature game controller to recognise an event and print text or something..
I've got the event in the creature meta which is added to the object as json. Trying to understand how to use the gamecontroller eventtrigger though. Is there anywhere that gives a really basic example? Everything seems to say go and read the unity docs on events/delegates, but i'm just hoping to see a super basic example of what this might look like using the creature game controller to recognise an event and print text or something..