0 Favourites

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.

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Tutorial: Platform School
267 93,729
Megabeard's avatar
Megabeard
Unread hot topic
99 10,130
karshinkoff's avatar
karshinkoff
Unread hot topic
121 11,753
Artpunk's avatar
Artpunk