Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Sledgy on Wed 20/05/2020 23:25:09

Title: ChangeRoom vs SetAsPlayer
Post by: Sledgy on Wed 20/05/2020 23:25:09
I have several characters in some rooms. And they move in rooms and teleport to another rooms. And player can choose any character (SetAsPlayer).

And sometimes there's error. Maybe, when character in teleport mode (ChangeRoom), he can't to set as player? And game is out after that error.

(https://i.imgur.com/KANohLG.png)

The same error was about SetAsPlayer.
Title: Re: ChangeRoom vs SetAsPlayer
Post by: Cassiebsg on Thu 21/05/2020 07:41:28
The error says it already. You have issued a RestartGame, so the game will Restart when the function ends. And therefor you can't change room or change to another player at the end of the function either.
So find out why you have issued a RestartGame and fix it.