Page 1 of 1

Function help needed

PostPosted: Sat Jul 01, 2006 12:11 pm
by duracel92
I'd just like to know how the function, animindex would help making combat scenario's. I read something like using the code to make only 1 animation 'do damage' to another actor...?

PostPosted: Sat Jul 01, 2006 5:27 pm
by Just4Fun
This may help you understand animindex:

Use animindex(count from 0) to find the actual animation of your actor. Each animation that an actor has has a unique index assigned to it. ( This way you can tell which animation is currently running. )
If your actor has 3 animations, then:
The first animation has animindex = 0
The second animation has animindex = 1
The third animation has animindex = 2
This variable is read only.


How would this help you design a combat senario?

Hmm, I suppose that you could change your animations based on collisions or something like that.

There are quite a few posts in the forum on animindex. You might want to search and see if any of the topics apply to what you are trying to do. HTHs... :wink:

PostPosted: Sat Jul 01, 2006 7:11 pm
by duracel92
The plan was to use the function to make only 1 or 2 frames in 1 animation - based on a collision event - decerease a 'health' variable on the opposing actor.