Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 05/09/2006 19:07:38

Title: Setting object view
Post by: on Tue 05/09/2006 19:07:38
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)?
Title: Re: Setting object view
Post by: R4L on Tue 05/09/2006 19:10:18
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.
Title: Re: Setting object view
Post by: on Tue 05/09/2006 19:18:05
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!
Title: Re: Setting object view
Post by: Ashen on Tue 05/09/2006 19:18:52
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.
Title: Re: Setting object view
Post by: on Tue 05/09/2006 19:19:57
Ah thanks.. Yeah I know I need to learn, but I get carried away with doing the game instead!