How do I: Teleport Between Platforms

  • Hello all!

    I have a question regarding teleporting back and forth between 2 platforms. They are both named sprites with images and no other behaviors. I named them simply Warp1 and Warp2. My player object is also a sprite named Player with an image(png) and just the Platform movement behavior.

    My code is simple;

    Condition(s)-On Key Pressed(Space Bar), Player Is Overlapping with Warp1

    Action: Player Set Position to Warp2

    Condition(s)-On Key Pressed(Space Bar), Player Is Overlapping with Warp2

    Action: Player Set Position to Warp1

    The code works fine when only one of them is active but I'm running into an issue when I try to warp while both sets of code are active. I press space on Warp1 and just end up in the middle of Warp1 (same thing with Warp2).

    Am I missing something obvious here? Its probably right in front of me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are many ways to solve this...

    try with a simple delay...

    Condition(s)-On Key Pressed(Space Bar), Player Is Overlapping with Warp1

    Action: System Wait 0.5 seconds

    Player Set Position to Warp2

    Condition(s)-On Key Pressed(Space Bar), Player Is Overlapping with Warp2

    Action: System Wait 0.5 seconds

    Player Set Position to Warp1

  • Ah, that worked! Thankyou!

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