Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 03/05/2005 11:36:36

Title: Foreground Object Animating
Post by: on Tue 03/05/2005 11:36:36
My problem is that I want to create a simple animated object in my room. Is there a possibility to create it like a character (if not the creator of this great AGS should make it  ;) )? It shall be in front which means walk-behind-able. To be exact:
I want to change an object-normal-sprite to a view.

PLEASE HELP!!!

greetz
Title: Re: FOREGROUND OBJECT ANIMATING
Post by: Ashen on Tue 03/05/2005 12:05:40
It's all in the manual:

Quote from: The Manual
SetObjectView
SetObjectView (int object, int view)

Sets object number OBJECT's view to VIEW. The graphic is set to the first frame of loop 0 of the view.
Example:

SetObjectView(3,14);

will change object's 3 view to view number 14.
See Also: AnimateObject, SetObjectFrame

Or, if you're using 2.7:
Quote from: Still The Manual
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.
See Also: Object.Animate

Or, if you're using the Interaction Editor: Object - Set object view number


You'll probably want to put it in one of the Player enters screen interactions.
Title: Re: FOREGROUND OBJECT ANIMATING
Post by: Gilbert on Tue 03/05/2005 12:08:19
These are just basic features of AGS.
1. You can set baselines for the objects so they can be in front or behind other stuff as you need.
2. For animation, if you're using interaction editor actions, just check out the "object - ..." actions (like "object - Set object view number" and "object - Start object animating", etc.); if you're using text scripts, just check out related functions like SetObjectView() and AnimateObject(), etc. (if you're using the most recent version V2.7, just check out the stuff from "Scripting - Object functions and properties".

You know, You should have played around with the editor a bit and read the manual before asking such basic questions...

Edit - I typed this while Ashen's replying, but I want to point out also the interaction menu part and I was too lazy to edit, I'll just put this post as-is.
Title: Re: FOREGROUND OBJECT ANIMATING
Post by: on Tue 03/05/2005 14:53:59
that's it!

first: where to get 2.7? i D/Ld from ags.co.uk and only got 2.62...hmm..
second:i looked in the manual and the faq AND searched tuts for it in google. i only got one problem. i am german which actually isn't a problem, but i have problems with reading english more than writing. but anyway THANK YOU VERY MUCH, you helped me out.

greetz
Title: Re: FOREGROUND OBJECT ANIMATING
Post by: strazer on Tue 03/05/2005 15:40:18
AGS v2.7 has just been released (see Technical Forum (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20582.0)), but the website hasn't been updated yet.
Title: Re: FOREGROUND OBJECT ANIMATING
Post by: Scummbuddy on Tue 03/05/2005 16:21:30
Also, if you would like "there is also an unofficial  German AGS Forum. (http://www.adventure-treff.de/forum/index.php?board=7) Provided by Adventure-Treff, it is for German-speaking people to discuss AGS. It is not officially supported."
Title: Re: FOREGROUND OBJECT ANIMATING
Post by: on Tue 03/05/2005 16:27:21
okay okay !! i understood. you want to tell me that i am a bad forum user and shall not post so thoughtless.  ;D
I won't in future. promised.

and thx for that german thing. i'll go and check it NOW.

greetz.