Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: lazy-slob on Sun 16/12/2018 17:47:49

Title: Start different dialog based on room location
Post by: lazy-slob on Sun 16/12/2018 17:47:49
Hi All,

I want to start a dialog when interacting with character but if in room 1 launch a different dialog compared to room 2.

Please can someone advise an if statement.

Thanks
Title: Re: Start different dialog based on room location
Post by: eri0o on Sun 16/12/2018 18:32:16
Characters have a Room property. You can use to get a character room or the player room as an integer.

Code (ags) Select

if(cCharacter.Room==1){
  dDialog1.Start()
} else if(cCharacter.Room==2){
  dDialog2.Start()
}