using 3 switches to trigger room change? [SOLVED]

Started by sazterM, Mon 10/11/2008 23:10:11

Previous topic - Next topic

sazterM

Im at a loss TBH , what i want to do is use three switches to trigger a room change. i want it so the room changes only after all have been tripped (preferably in any order). Any advice on how i could do this would be great.

Trent R

In the rep_exec in your room script:

Code: ags
if (trigger1==true && trigger2==true && trigger3==true) {
  //Whatever code, probably player.ChangeRoom
}


This makes your triggers each boolean (which would have to be declared at the top of the room script), but depending on what you want you can make it when another character leaves the room, or the player gets an inv. item, etc, etc. Either way, you should use && in the if statement.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

sazterM


SMF spam blocked by CleanTalk