Forum rules - please read before posting.

[SOLVED] Last Visited Marker

Hey Chris!

One of the scenes in my game is a kind of hub - it has several exits that lead to other scenes plus different cutscenes that run depending on which state the game is in. But because there is only one PlayerStart it doesn't matter which entrance the player comes in through, he always shows up in the same place.

I've seen that I can combat this by using the Check Last Scene action, but doing that for one room already resulted in a bit of a complicated schema, let alone if I add six more previous scene checks alongside a few cutscene triggers :)

So do you think it would be possible to append the Change Scene action with some kind of Last Visited Marker option? I don't know if Unity can return that value, but that way I could put markers at all the hub exits and have them regulate where the player shows up.

Alternatively, if I could add multiple checks to the Last Scene action instead of only one, that would also help a lot. That would go for the Variable Check action too, actually. Maybe that is even a better option now that I think about it... but anyway you're the code wizard here!


  • No need!  You can lay down as many PlayerStarts as you need - the "default" one is only used when no others exist.

    Inside the PlayerStart inspector, you'll find an option to set the previous scene it's to be used for.  When the player appears in the scene, it checks all available PlayerStarts and places him at the right one.
  • Ace! I never noticed that field before. That's perfect then, thanks :)
  • edited March 2014
    I have a similar problem though, but not quite the same. I have several doors in a scene, which leads to the same scene (a mini game). When the exit button in the mini game is pressed, I'd like to appear by the door which the player entered. Is there a possibility to pick a PlayerStartMarker in the Engine: Change Scene Action? Or could I solve this in some other way?
  • I'd just create an integer that is set as "1" when it goes through door 1, "2" for door 2, and so on.

    Then upon loading your room when they enter, just do a Variable:Check action and move your player to the relevant marker/PlayerStart.
  • edited April 2014
    Thank you for your post TayannaStudios, it helped! Eventually I solved it by setting a default PlayerStart by the door I choose right before I enter using the Engine: ChangeSetting action (new for 1.29).
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.