How do I spawn to a certain platform after death?

  • So basically, if my player falls, he is reset to the start position.

    The problem is, if the player is jumping from a different platform, he'll still be reset to the start platform.

    How do I change it so that you are reset to the last platform you were standing on?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can detect which platform your player has landed on by having an invisible sprite under him, or by using overlap at offset.

    You can then have an instance variable for each platform that gets set to "1" as he lands on it - and set all others to "0" (use a for each platform loop).

    Then when you respawn, create the player at the platform that has the instance variable set to 1.

    Hope that made sense.

    ~Sol

  • I'm very new to this, so this may take a while to figure out haha. But thanks.

  • If I can get my kids to settle down to bed here soon, I'll try to make a quick example for you

    *EDIT*

    Here we go... using the standard C2 "platformer" template, I quickly made the last few events on the event sheet so it records which platform you touch last.

    It only records static platforms, but you could make it do any platform, or maybe just a specific platform or "checkpoint".

    DOWNLOAD CAPX

    ~Sol

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