Incapacitated mode

Metlimp Posts: 3Member
Hi everyone!

I've been using UFPS for some months and been able to solve almost all my needs, but when your life reaches 0, can you be incapacitated instead of dead and then respawn? Like in SW Republic Commando, or Left for dead.

I'm thinking about creating a State that freezes the movement and somehow lower the height of player when reaching certain level of health, but I would like to know if anyone have other ideas of how to.

Thank you, have a nice day!

Best Answer

  • TryThisTryThis Posts: 880
    edited November 13 Answer ✓
    I think, because damage comes to the player in clumps (unknown quantities I mean, such as in the case of falling or explosions) that you are going to have to intercept the damage amount before it gets sent to the player's damage handler where it might trigger the Start Dead activity (the Die message). I haven't the ability to look at the damage handler at this moment, but one might also be able to become involved in the damage process there. I mean, one might be able to do some quick math there to see, in advance, if death was going to occur and take appropriate actions. It would be nice to be able to simply look at the current health of the player, but because damage comes in clumps sometimes, that would not be a reliable procedure. The player's health frequently drops well below zero, as you may have noticed, prior to the whole Die routine being triggered. The mechanics of stopping the death process (the normal die thing and respawning) is really very straight forward. Think about how a pause menu might work, a menu that has an option to restart a level, for example.

Answers

  • ACARROTACARROT Posts: 344Member
    Will your game be multiplayer or single player?
  • Metlimp Posts: 3Member
    TryThis said:

    I think, because damage comes to the player in clumps (unknown quantities I mean, such as in the case of falling or explosions) that you are going to have to intercept the damage amount before it gets sent to the player's damage handler where it might trigger the Start Dead activity (the Die message). I haven't the ability to look at the damage handler at this moment, but one might also be able to become involved in the damage process there. I mean, one might be able to do some quick math there to see, in advance, if death was going to occur and take appropriate actions. It would be nice to be able to simply look at the current health of the player, but because damage comes in clumps sometimes, that would not be a reliable procedure. The player's health frequently drops well below zero, as you may have noticed, prior to the whole Die routine being triggered. The mechanics of stopping the death process (the normal die thing and respawning) is really very straight forward. Think about how a pause menu might work, a menu that has an option to restart a level, for example.

    Thank you. You're right about intercepting the damage, didn't thought about that before.

    I'll have to deeply study the DamageHandler and the EventHandler and find the best solution. Maybe just overwrite the Dead Activity, after all, the player can't die in this game unless his partner dies, but that would restart the level (no respawning).
  • Metlimp Posts: 3Member
    ACARROT said:

    Will your game be multiplayer or single player?

    Both. You can play with another player or with the AI.
Sign In or Register to comment.