Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Bobsy on Fri 14/08/2009 15:49:01

Title: firing off events when entering room first time only
Post by: Bobsy on Fri 14/08/2009 15:49:01
Simple enough problem, I should reckon. What's the easiest/cleanest way to have a certain event happen ONLY the first time the player character enters a room.

For example, our dashing hero enters the kitchen. He's not allowed in the kitchen. The cook starts a dialog to explain why he's not allowed in the kitchen. On returning to the room later, our dashing hero should not have to go through the same dialog again.
Title: Re: firing off events when entering room first time only
Post by: Matti on Fri 14/08/2009 15:52:47
It couldn't be easier. There's a "First time enter" event in the room's panel. Create that event and post you code there.

Edit:
In your case I can't imagine that it makes much sense though, because the player could enter the room right after the cook has thrown him out. If the player should accomplish something before he can enter the room, use a variable and check it to decide what should happen when he enters the kitchen.
Title: Re: firing off events when entering room first time only
Post by: Bobsy on Fri 14/08/2009 18:45:31
So there is. Right there in front of me. Staring me in the face.

Sigh.

> Use HAMMER on BRAIN.