Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ostyster on Thu 04/08/2016 13:04:49

Title: ignore always execute for one room
Post by: Ostyster on Thu 04/08/2016 13:04:49
I have a room in witch i want to ignore what i wrote in the global script after: function repeatedly_execute()
how do i do that?
Title: Re: ignore always execute for one room
Post by: CaesarCub on Thu 04/08/2016 13:11:29
You could make the repeatedly_execute() code check if the player is in said room, and if he is not, only then run the script.
Title: Re: ignore always execute for one room
Post by: Gurok on Thu 04/08/2016 13:12:47
Yes.

Depending on how you want to structure things, inside repeatedly_execute:

if(player.Room != roomNumberYouWantToIgnore)
{
  // Your normal repeatedly_execute code
}


or

if(player.Room == roomNumberYouWantToIgnore)
  return;
// Your normal repeatedly_execute code
Title: Re: ignore always execute for one room
Post by: Ostyster on Thu 04/08/2016 13:25:36
It worked the way i wanted. Thanks