I don't know if I've asked this before or not but whatever the case it still isn't solved.If I could make a condition that if the character changes the room I could save much time.Is there a way to have something like.
if(player.ChangeRoom==true)
{}
Now I know this doesn't work but is there anything similar that works?
You can check if the player enters or leaves a room in the on_event (https://adventuregamestudio.github.io/ags-manual/Globalfunctions_Event.html#on_event) function in the global script.
function on_event(EventType event, int data)
{
if (event == eEventLeaveRoom)
{
// do something
}
}
Iv'e tried that but for some reason it doesn't always recognise if they leave.Sometimes it works but sometimes it doesn't until you enter the room again and leave.
If you've already tried something, please always show your code.
I don't have access to the code anymore.I'm just gonna assume that it's just something I did wrong.Thanks anyways.