Help in AnimateObject

Started by placyd, Sat 03/01/2004 23:17:34

Previous topic - Next topic

placyd

Hi! I have a problem with AnimateObject function.
There is a room, and an object what i want to be animated continously.
The object is numbered 0, the object view is numbered 2 and the loop
is 0.
Here is my script in the room's repeatedly exetute:

SetObjectView (0,2);
AnimateObject (0,0,0,0);

I tried to change the numbers but the object is still the first from the loop.

Please someone help with this.

Inkoddi

AnimateObject(int object, int loop, int delay, int repeat)

It says this in the manual:

QuoteThe REPEAT parameter sets whether the animation will continuously repeat the cycling through the frames. If REPEAT is zero, the animation will start from the first frame of LOOP, and go through each frame in turn until the last frame, where it will stop. If REPEAT is 1, when the last frame is reached, it will go back to the first frame and start over again with the animation. If REPEAT is 2, it will do the animation once, but then return the graphic to the first frame and stop (whereas repeat=0 will leave the graphic on the last frame).

Try making it to:

SetObjectView(0,2);
AnimateObject(0,0,0,1)

toot

placyd

I tried but it didnt work  :'(
It was the same - just the first frame of the loop was showed - no animation.

Scorpiorus

You shouldn't put such commands as AnimateObject() in repeatedly_execute since then the object's animation is restarted every game loop and that is why you see only the first frame. Put these commands on player enters room, for example:

//player enters room (after fadein)

SetObjectView(0,2);
AnimateObject(0,0,0,1);

~Cheers

placyd

Hi!

I tried with afterfadein but it didnt work, but
it works with beforefadein !!!  :)

Thanks for your helps, guys!

SMF spam blocked by CleanTalk