Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Terrorcell on Mon 30/07/2007 03:45:22

Title: problems with the parser [SOLVED]
Post by: Terrorcell on Mon 30/07/2007 03:45:22
Ive been creating a new game and I have tried using the text parser. I have been having trouble with the parser, for example, if I was in one room and i typed 'look at door', it would display 'Its a red door'. But if I was in a new room, and i made a new parse for the new rooms door, i would type 'look at door' and it would display 'Its a blue door' but what i dont want it to say is 'Its a blue door' 'Its a red door'. How do I make it so that when i type in 'look at door, it displays the text in each room?
Title: Re: problems with the parser
Post by: Gilbert on Mon 30/07/2007 03:52:43
Try something like:

if (player.Room==1) Display("It's a blue door.");
  else if (player.Room==2) Display("It's a red door.");


Title: Re: problems with the parser
Post by: Terrorcell on Mon 30/07/2007 07:49:59
thanks, i didnt think of that! ;)