How do I - portal doors (platform)

0 favourites
  • 2 posts
From the Asset Store
Make your game experience to another level with this doors! :D
  • Event - Player on collision with Door 1

    Action - (move position-player moves to Door 2)

    this part works fine, its when I add the reverse equation that it gets all messed up.

    Event - Player on collision with Door 2

    Action - (move position-player moves to Door 1)

    once I have this second equation implemented, when the player runs into the first door at the layout start, nothing happens because of the 2nd equation immediately spawning the player back to door 1 as door 1 is simultaneously spawning the player at door 2. Make sense?

    I've tried everything I can think of, adding wait times, destroy usage, a global variable that i probably didn't correctly make. Any help would be great. I can't post a capx because Im on a boat in the middle of the ocean and only have internet on the work computer.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This works like that you descripbed.

    A solution could be to move the player further then the other door when moving through the door. Like teleport him to in front of the other door. not inside it

    Event - Player on collision with Door 1

    Action - (move position-player moves to Door 2 + SOME_MORE)

    Event - Player on collision with Door 2

    Action - (move position-player moves to Door 1 + SOME_MORE)

    Or set a flag 1 when the player has moved through the door and set it to 0 when its not overlapping door, and only let it move through when this flag is 0.

    Event - Player on collision with Door 1

    Event - AND MoveThrough = 0

    Action - (move position-player moves to Door 2)

    Action - Set MoveThrough = 1

    Event - Player on collision with Door 2

    Event - AND MoveThrough = 0

    Action - (move position-player moves to Door 1)

    Action - Set MoveThrough = 1

    Event - NOT(Player overlapping with Door1)

    Event - NOT(Player overlapping with Door2)

    Action - Set MoveThrough = 0

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)