Setting conditions for leaving a room.

Started by alec.ritchie, Mon 10/08/2009 13:52:05

Previous topic - Next topic

alec.ritchie

Hello,

I'm pretty new at this whole AGS thing. I think its great that I've found a community as dedicated to old school adventure games as I am.

I'm having trouble setting conditions for my character to leave a room. I want him to only be able to leave the room if he participates in some dialogue.

All help would be greatly appreciated.

- Alec.

Mazoliin

A simpel way would be to use a bool/int.

Create a bool in the global variables.

Code: ags

//And before the player leaves the room, check the bool
if (CanLeave){ //Here the bool is called "CanLeave"
  //The code to leave the room
  player.ChangeRoom(X);
}
else player.Say("I'll have to talk to the guy!");


And in the right place in the dialog, simply press tab and write CanLeave = true;

SMF spam blocked by CleanTalk