The action "stop forcing player to be hero" doesn't work

Hello, i want to create a wereworlf game, i almost finished it but i still have a problem remaining.
The action “stop forcing player to be hero” doesn’t work
For example :
everybody start as soldier

  1. when i press a key i transform player 1 as reaper (with the action “start forcing player to be hero”)
  2. then i want him to stop being reaper, so to be back as soldier, when i press another key (with the action “stop forcing player to be hero”)
    but it doesn’t work

I tried another solution which is :

  1. Start forcing player to be hero (reaper)
  2. Start forcing player to be hero (soldier)
    It works but the problem here is that if i killed them before… they respawn when i change their hero (even if i kill them when they are as reaper and as soldier) sooo i kill player 1 as soldier… change him as reaper and he’s back (i need to pass by this change cause this key i press also activate other actions that i need)
    And the problem doesn’t come from the action disable respawn that’s for sure

Stop Forcing Player To Be Hero simply unlocks the rest of the hero roster to the player (like if they choose to switch heroes), because Start Forcing Player To Be Hero will lock the player into only playing the specified hero and automatically disallow every other hero. Stop Forcing Player To Be Hero will not switch someone’s hero back to what it was before.

Start Forcing Player To Be Hero will also resurrect a dead player when their hero is switched. You’ll simply have to work around this, by either only changing their hero once they are alive (try setting a variable when they die) or by quickly killing them immediately after they switch to the new hero.

4 Likes

Thank you this helps a lot but i did find a solution. Considering that i’m bad at coding and new to the workshop, i decided to switch the dead players to spectators, this solves my problem. But thanks for your answer