Number of object ?

Started by Candle, Fri 09/04/2004 04:31:24

Previous topic - Next topic

Candle

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 .



Darth Mandarb

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?

Candle

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 ?

Gilbert

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).

SMF spam blocked by CleanTalk