Animating Objects...

Started by Squinky, Tue 24/02/2004 18:54:03

Previous topic - Next topic

Squinky

One thing I've never understood is animating objects. According to the description of this function, you need to pick a view like animate character....but, objects don't have views...or do they?


SLaMgRInDeR

well, there is nothing that says they are just character views, so i would imagine that you make another view in the normal view screen, but then i'm no veteran, you tell me...

Squinky

From the manual:

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

Starts the object number OBJECT animating, using loop number LOOP of its current view. The overall speed of the animation is set with SPEED, where 0 is the fastest, and increasing numbers mean slower. The delay for each frame is worked out as SPEED + FRAME SPD, so the individual frame speeds are relative to this overall speed.

Theres my prob with it right there, what view? My objects don't have views...am I missing something, cause I've been using characters instead of objects for a while, but I'd like to figure this out...

SSH

Maybe you could look at SetObjectView in the manual, too?  ;)

12

Squinky

Bah!1111

Heh....so thats all there is to it huh? Heh, Thanks....

Now onto my next question, that I really should know by now.

Animating Characters:

When I animate, it always just sticks in the middle of the animation, dosen't go back to the state it was before the animations...anybody know what the hell I'm doing?


Mr_Frisby

You can use AnimateObjectEx to make it a blocking call and/or get it to return to the start, and end at the end - which ever you want (there's also a repeat variable but you probably know aboot that one) and even play the anim backwards.

an example :

AnimateObjectEx (1, 7, 4, 2, 0, 1)

Object 1 animates from view 7 and speed 4 ,
it will play the animation once forward and then return to the first frame (the 2 does this - 0 will leave it at the end and 1 will repeat) and it will wait for the anim to finish before returning to the script.



Hey! All my awesome trophies dissapeared in the year since I was here last. CONSARN_IT! with an underscore!!! I earned dem tings!! Oh well. Hope your Monkey floats.

RickJ

#6
Hey Squinker,

Object:
You need to use SetObjectViiew() or SetObjectFrame() before you use AnimateObject() or AnimateObjectEx().

Character:
Set the last parameter of AnimateCharacter(), repeat, to a value of 1.  From help:

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.

SMF spam blocked by CleanTalk