Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 19/02/2005 17:25:33

Title: problems with animation
Post by: on Sat 19/02/2005 17:25:33
For example, say I had a drawer In a desk, and I want it so you could open it, and remove an item from it. How would I be able to let the character open the drawer and then, the next time he/she was to come in the room, the drawer would still be open ???
Title: Re: problems with animation
Post by: Scummbuddy on Sat 19/02/2005 17:37:06
Turning on and off objects.

Global Ints
-------------------
a) you have the background drawn with the drawer closed. Then if you say "open hotspot" (drawer) then you set Object On, which corresponds to a graphic that you set up in objects in the room editor, and have it initially off, but now it will be set on, and with setting it on, you set  a global int, to remember its 'state' or whether or not its open or closed, and in the interactions menu, under before fade in, when player enters room, you do a check on that global int to see whether or not to have that drawer open.

but for all room numbers below (200?) the state of the room is saved when exited, so this may include the way objects have been left, I cant remember right now, but its worth checking out.