Hi,
I'm using a long trigger that makes the player goes to a new scene.
In the new scene there's a PlayerStart prefab that indicates that comes from the previous scene.
The problem is that the PlayerStart is in a concrete x,y point but the player could come from the previous scene from a different corresponding point since the trigger is long a could be contacted at one point or another.
How could this be solved?
One way could be setup 10 triggers and 10 Playerstarts (each in a row and making the corresponding relationships), but this seems extremely cumbersome since I want to make a square map of "rooms" connected.
Is this the only way? or I'm missing (hopefully) something?
Thanks!
Carlos
Comments
Anyway, i would prolly keep a variable [int] for each point moved too. and onstart in the other scene check the variable numer, and teleport the character to relevant point.
Seriously though, this will drive you crazy as so many points to move from one scene to the next.
This would be placed in the first scene, at the green arrow in your first image. Just before the scene change, AC would examine the relative position between the Player and this Marker, and offset the Player by that amount in the next scene.
For anything more complex, you could continue to use variables - but I believe this would solve the majority of issues of this type.
Don't forget that custom Actions can let you do pretty much anything you like. You can access the player script during gameplay with:
AC.KickStarter.player