Setting object view

Started by , Tue 05/09/2006 19:07:38

Previous topic - Next topic

CarriePinza

Hi
I have fiddled around but can't find how to set the view for an object in order to run an animation. Do I have to do this using script(haven't learnt how to use it yet)?

R4L

You didn't happen to look in the manual did you?

SetView
(Formerly known as SetObjectFrame, which is now obsolete)
(Formerly known as SetObjectView, which is now obsolete)

Object.SetView(int view, optional int loop, optional int frame)

Sets the object's view to VIEW, and changes the object's graphic to FRAME of LOOP in VIEW. If you do not supply the loop or frame, they will be left unchanged.
You must use this command before calling Animate, so that AGS knows which view to animate the object with.

Example:

object[3].SetView(14);
object[1].SetView(5, 2, 0);

will change object 3's view to view number 14, and change object 1 to view 5, loop 2, frame 0.

Save you some time.

CarriePinza

Wow that was quick! Yeah but is that script you have to put in, or can u do this through the interactions editor? If so, where do you find this? Sorry, not getting what u said!

Ashen

In the Interaction Editor it's the command 'Object - Set object view number'. However, you might as well learn how to use the script commands as soon as you can - the Interaction Editor commads are OK for the very basics, but they can become limiting.
I know what you're thinking ... Don't think that.

CarriePinza

Ah thanks.. Yeah I know I need to learn, but I get carried away with doing the game instead!

SMF spam blocked by CleanTalk