How do I show where the player previously died?

  • Hi, I would like to know how I could create an indicator for the previous game overs' whereabouts. I apologize for not knowing the correct terminology for the mechanic; I'm new to this. Let me give you an example to clarify my question; when the main character dies, a tombstone appears. When you restart again, you'll see the tombstone when you go back to the place you previously died.

  • This should be quite straight forward.

    Create a 'headstone' sprite.

    When the player dies...

    1) Destroy the headstone (In case you created it in another place)

    2) spawn another object (action: Player>Spawn another object)

    3) Choose the headstone

    When the player dies, a headstone will be in its place.

    (Edit: If you restart the layout, you will need the PERSIST behaviour on the headstone to keep its values)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I would like to know how I could create an indicator for the previous game overs' whereabouts. I apologize for not knowing the correct terminology for the mechanic; I'm new to this. Let me give you an example to clarify my question; when the main character dies, a tombstone appears. When you restart again, you'll see the tombstone when you go back to the place you previously died.

    Create 2 global variables and make sure you dont reset them when layout is restarted! meaning dont use reset global variables.

    before you destroy your player sprite, save his position to the global variables (ie. LastXGlobal_Variable set value to player.x LastYGlobal_Variable set value to player.y, on start of layer create a tombstone or shadow of player on the saved coordonates, make sure is triggering once[or under the on start of layout condition], otherwise ur game will create sprites continuously and freeze ur game.)

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