Forum rules - please read before posting.

spawn point when change scene


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?




  • Could you post a screenshot to show exactly what you mean?  I'm having trouble visualising this.
  • Hi Chris,

    I made a screen scheme to showcase the problem.

    When the player tries to move from "scene 1" to "scene 2" they goes through the orange trigger al along the left border of the screen. No matter where is the point of contact he always spawn in the Player start point in "scene 2".

    The problem is that both scenes are "continuos" but the map is divided in square portions.

    The black arrows from trigger shows the way it should work, going from the left bottom side of the screen, should make the player appear in the bottom right side of the "scene 2".

    For that reason I was writing that the only way I think I could make this with AC is making several triggers and several PlayerStarts but this will be cumbersome in extreme.

    Do you know another way to get this done without die buried in triggers/Playerstarts? :)

    Hope the image makes the problem more easy to understand

    Thanks Chris!

  • Why is there a need for some many exit points? Can you just use one in the middle?  :P

    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. 

  • Hi klarax,

    first, thanks for your sugestion. I think something could be done with the variable-teleport trick you proposed, although I would like to see if some other robust way or component could be use. Hope Chris, could share if they know antoher way, if not I'll see if use that trick or look for some component.

    Regarding the need of this solution, here's another pic of a continuos adventure map game:


    this example map has 4 screens that conform a continuos world. If you follow the red arrows, you need to enter the next screen exactly in the right (x,y) point to avoid a wall or enter in another place of the maze that you suppose don't should enter yet (a maze, or a room in a house, or a place in a forest,...)

    I think this kind of adventure games is very used, and should be a simple way to do it. If AC doesn't support it, I think is a good way to extend the engine since is in the scope of the tool

  • Yes, I agree.  I think the best solution would be to be able to supply an optional "Relative Marker" object inside the Engine: Change scene Action.

    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.
  • Thanks Chris,

    so the solution you are proposing about a Relaive Marker inside the action is something is not ready yet, isn't it? Is something you'll introduce in a future version, right?

  • Yes, it'll be in v1.49.
  • Hi Chris,

    Could the same solution be applied to "Teleport" action?
    So If I teleport to another point in the scene, the player could be offset in one of the axys (x or z).

    The actual use case is that I want the player to cross a wall if he carries a concrete object, but he should pass the wall in the same axys and not to the concrete point if I only use a marker.

  • I think that would start to get too confusing.

    Don't forget that custom Actions can let you do pretty much anything you like.  You can access the player script during gameplay with:

  • Ok Chris, I'll try that way.

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.