Hi. I’m new in game development and I’m having some issues. I have a scene where you can go out by the door or by the window, both exits goes to the same scene. How can I identify at the cutscene from where come my character? Thanks a lot
The simplest (although not the only) way would probably be to set up a Global Variable called something like PlayerExitsFromRoom, defined as an Integer. Set it to 0 in the ActionList that runs when the Player exits via the Door, and set it to 1 when the Player exits via the Window
Then in the next Scene, all you need to do is run an ActionList to check the value of PlayerExitsFromRoom, and you'll know where the Player came from
(You may then want to Teleport the Player to different PlayerStarts in the new Scene, to correspond with the Door/Window exits in the previous scene)
Yes, a variable that is used to run one from a pair of Object: Teleport Actions would be the way to go.
For readability, I'd recommend going with a "PopUp" variable so that you can give it string-based values ("Door" and "Window") as opposed to having to remember which number means what.
Comments
The simplest (although not the only) way would probably be to set up a Global Variable called something like PlayerExitsFromRoom, defined as an Integer. Set it to 0 in the ActionList that runs when the Player exits via the Door, and set it to 1 when the Player exits via the Window
Then in the next Scene, all you need to do is run an ActionList to check the value of PlayerExitsFromRoom, and you'll know where the Player came from
(You may then want to Teleport the Player to different PlayerStarts in the new Scene, to correspond with the Door/Window exits in the previous scene)
Welcome to the community, @ClariceStarling.
Yes, a variable that is used to run one from a pair of Object: Teleport Actions would be the way to go.
For readability, I'd recommend going with a "PopUp" variable so that you can give it string-based values ("Door" and "Window") as opposed to having to remember which number means what.