Frictional Games Forum (read-only)

Full Version: Call animation for enemy?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, i've set a player to look at an enemy and I was wondering if there is a code to call an animation on the enemy? Like

void CallAnimation(asEntity, animation)
or something like that?
There is a basic function that allows use for specific animations, but it requires the use of path nodes:

AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

Basically, the enemy will move to a position node, then play an animation. To find the name of the animations to use in the string argument, open an enemy in the model editor, then go to "Settings>Animations". The brute has animations like "SwingClaws01" and "SwingClaws02".

Hope that helped!
(02-02-2013, 07:15 AM)andyrockin123 Wrote: [ -> ]There is a basic function that allows use for specific animations, but it requires the use of path nodes:

AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

Basically, the enemy will move to a position node, then play an animation. To find the name of the animations to use in the string argument, open an enemy in the model editor, then go to "Settings>Animations". The brute has animations like "SwingClaws01" and "SwingClaws02".

Hope that helped!

Thanks, i'm going to test right now!

Ok, that did not work but I am going to have the enemy kill the player then the intro for the custom story will start, how could I accomplish that?
the OnDeath moment and possibly the intro?