Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Fri 09/04/2004 04:31:24

Title: Number of object ?
Post by: on Fri 09/04/2004 04:31:24
I took the door out of the demo game to see if i could make it  with just drag and drop but i don't know how to tell what the object number would be ? so here are two pictures can you tell me what I would use from them .

(http://12.22.230.41/MicroTech/Hosted/Files-A/view.png)
(http://12.22.230.41/MicroTech/Hosted/Files-A/ac22234.png)
Title: Re:Number of object ?
Post by: Darth Mandarb on Fri 09/04/2004 04:58:01
Object # is the number of the object as it's placed in the room (starts with 0).

So if the door is the only object you have in the room it would be Object 0 (zero)

Before you can animate an object, you must assign it a view (which is the left side of the first picture you posted).

Then (in the second picture) you select which loop (from the view you selected) to use.

So for this example (assuming it's the only object in the room and you want the door to open (first)) [ I'm guessing Loop 0 is the opening animation? - It's hard to tell ]

SetObjectView(0,6);
AnimateObject(0,0,0,False);

This code sets object 0 to use view 6, then animates object 0, loop 0 in view 6 at 0 speed, and doesn't repeat.

Does that help?
Title: Re:Number of object ?
Post by: on Fri 09/04/2004 05:11:44
Ok I understand now it goes by room not all the objects you have ..
So you do not count the player / char sprite then .
The false gave an error but 0 worked fine was that right to use 0 as false ?
Title: Re:Number of object ?
Post by: Gilbert on Fri 09/04/2004 07:16:39
Just use 0, if I remember right, the FALSE constant name should be all in CAPS (if it's really predefined, I can't remember).