Forum rules - please read before posting.

Store Player Location into variable?

Is it possible to store player location into a variable? I want to have 2 identically scence but different textures. and a way to switch ingame between scences and have the player standing at the position where he switched scences so marker wont work since position is random based on player control.

Comments

  • Bear in mind that another approach to this would be to use one scene, and use animation to control its appearance, but yes - you can use AC's Events Editor to move a Marker to the Player before the scene change, and then move the Player to the Marker afterwards.

    Create a new Marker, make it a prefab, and attach the Survive Scene Changes and Constant ID components, checking Retain in prefab?.

    Then go to AC's Events Editor in the top toolbar, and create Scene: Change: Before and Scene: Change: After. In the first, use the Object: Add or remove Action to spawn the Marker, then Object: Teleport Action to teleport the Marker prefab to the Player.

    In the second, do the opposite - teleport the Player to the Marker, then remove it from the scene. You can insert a Scene: Check Action into the second list to make sure the Player only gets teleported when in the correct scene.

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.