Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jojowl80 on Tue 14/07/2020 01:59:43

Title: Change room to previous room?
Post by: Jojowl80 on Tue 14/07/2020 01:59:43
Is there any command to change the room to the previous one? I have a map, I want to be able to click on an arrow and it goes back to the room the character was in.
Obviously the player will use this map in multiple rooms so I cant have the character always returning to the same room every time. thanks!
Title: Re: Change room to previous room?
Post by: Gilbert on Tue 14/07/2020 02:10:01
Just use player.ChangeRoom(player.PreviousRoom).

For more information on the parameters, etc. check the corresponding manual entries:
https://www.adventuregamestudio.co.uk/manual/ags46.htm#Character.ChangeRoom (https://www.adventuregamestudio.co.uk/manual/ags46.htm#Character.ChangeRoom)
https://www.adventuregamestudio.co.uk/manual/ags46.htm#Character.PreviousRoom (https://www.adventuregamestudio.co.uk/manual/ags46.htm#Character.PreviousRoom)
Title: Re: Change room to previous room?
Post by: Jojowl80 on Tue 14/07/2020 02:15:39
awesome thanks! had no idea these manuals existed thank you for showing them to me
Title: Re: Change room to previous room?
Post by: Gilbert on Tue 14/07/2020 02:24:35
You can also press F1 while running the AGS Editor to open the manual.
Title: Re: Change room to previous room?
Post by: eri0o on Tue 14/07/2020 02:57:57
Also here : https://adventuregamestudio.github.io/ags-manual/