- Home /
hey, is it possible to use a teleport transform script that will teleport you to a certain location on a different scene?
im using 2D to make a JRPG type game and i am using a basic scene changer script to go from "towns" back to the "world map".
the problem i have is that when i load the "world map" it goes back to the basic position that is set in the "world map" scene the first time it loads.
is it possible to use a teleport / transform.position of some kind to make it exit- "town2" and back to the world map at "town2" location?
should i be looking in teleport.transform section? or remaking a whole "world map" scene with the sprites base position at "town2" ?? (which would increase the game size in megabytes by probobly quadruple)
ok, I'm still struggling with this.
is there an easier way eg. a trigger that changes scene and moves you to location x: y: ??
that way i can make the scene and location choices public and attach to exits?
Answer by Raresh · Feb 16, 2017 at 01:55 PM
Have a script that persists through scenes (DoNotDestroyOnLoad()) and pass either the position you were in the scene before you switched and then figure out where to be, or just simply pass it where you are supposed to be. You can have like an object in every scene that has empty game objects with UNIQUE names/id's and teleport to them.