Foreground Object Animating

Started by Sonim, Tue 03/05/2005 11:36:36

Previous topic - Next topic

Sonim

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

Ashen

#1
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.
I know what you're thinking ... Don't think that.

Gilbert

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.

Sonim

#3
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

strazer

AGS v2.7 has just been released (see Technical Forum), but the website hasn't been updated yet.

Scummbuddy

Also, if you would like "there is also an unofficial German AGS Forum. Provided by Adventure-Treff, it is for German-speaking people to discuss AGS. It is not officially supported."
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Sonim

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.

SMF spam blocked by CleanTalk