Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Paratoxin57 on Sat 12/01/2013 16:33:30

Title: Trigger something in a different room? SOLVED
Post by: Paratoxin57 on Sat 12/01/2013 16:33:30
Is there a way to cause something to happen in a different room?  For instance maybe i have a map as one room.  In a different room I have a character that tells you to go find the place. After telling you to find that place i want an object on the map to become visible. Suggestions?
Title: Re: Trigger something in a different room?
Post by: Ghost on Sat 12/01/2013 16:51:44
You can create a boolean variable (like "bool MapLocation_1_Unlocked") in your global script, set it to true from anywhere in your code, and check against it in your map room's "before fadein" event. If you have many rooms, an array would be better.
I used a similar map feature once and kept an enum of all world locations together with custom functions for unlocking a location- made the script more readable.

Simple and not too elegant, but tried and tested.
Title: Re: Trigger something in a different room?
Post by: Paratoxin57 on Sat 12/01/2013 16:53:08
Ok thanks a lot!  :smiley: