Little trouble with animating

Started by InCreator, Tue 04/05/2004 15:44:38

Previous topic - Next topic

InCreator

I'm very used to character variables, such as character[X].animating and so. Now, I have to wait until object finishes animating and -- well, objects doesn't seem to have such variables like characters do. I'm talking about

while (character [ x ] .animating) Wait(1);
(spaces are added because BBCode messes thread up otherwise)

Only way I figured out so far is Waiting by a number of steps object needs to complete animation. This needs some trial and error and is quite messy (for me, that is). Especially when I increase delay in AnimateObject command. Is there some simpler way?

Ashen

IsObjectAnimating (int object)

Returns 1 if the specified OBJECT is currently animating. Returns 0 if the object has finished its animation.
Example:

AnimateObject(2,5,0,0);
while (IsObjectAnimating(2)==1) Wait(1);

Wierd that objects get a function, while characters have to use the variable, but still.....
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk