Change room to previous room?

Started by Jojowl80, Tue 14/07/2020 01:59:43

Previous topic - Next topic

Jojowl80

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!

Gilbert

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.PreviousRoom

Jojowl80

awesome thanks! had no idea these manuals existed thank you for showing them to me

Gilbert

You can also press F1 while running the AGS Editor to open the manual.


SMF spam blocked by CleanTalk