Making specific player units immortal

I’m making a gamemode for my friend’s “Customs Streams” and could do with some help.

I’ve got most of the bits working, but I’m struggling to make players mortal/immortal when they enter/exit a specific area.

The Trigger I’m using is as follows:

Safety{
    is_enabled:b=yes
    comments:t="Manages safety of Runners"

    props{
      actionsType:t="PERFORM_ONE_BY_ONE"
      conditionsType:t="ALL"
      enableAfterComplete:b=yes
    }

    events{
      periodicEvent{
        time:r=1
      }
    }

    conditions{
      unitWhenInArea{
        math:t="3D"
        object_type:t="isTeamA"
        object_marking:i=0
        object_var_name:t=""
        object_var_comp_op:t="equal"
        check_objects:t="any"
        object:t="Runner Squad"
        target:t="Playing Field"
      }
    }

    actions{
      unitSetProperties{
        object:t="Runner Squad"
        useForTriggerFiltered:b=yes
        isImmortal:b=no
      }

      playHint{
        hintType:t="standard"
        name:t="!!!NOT SAFE!!!"
        action:t="show"
        blink:b=yes
        shouldFadeOut:b=no
        isOverFade:b=no
        time:r=1
        priority:i=0
        target_marking:i=0
        object_var_name:t=""
        object_var_comp_op:t="equal"
        object_var_value:i=0
        useForTriggerFiltered:b=yes
        team:t="A"
      }
    }

    else_actions{
      unitSetProperties{
        object:t="Runner Squad"
        useForTriggerFiltered:b=yes
        isImmortal:b=yes
      }

      playHint{
        hintType:t="standard"
        name:t="SAFE"
        action:t="show"
        shouldFadeOut:b=no
        isOverFade:b=no
        time:r=1
        priority:i=0
        target_marking:i=0
        object_var_name:t=""
        object_var_comp_op:t="equal"
        object_var_value:i=0
        useForTriggerFiltered:b=yes
        team:t="A"
      }
    }
  }

Runner Squad is the squad containing the Team A players.
Playing Field is the area in which I want players to be mortal (everywhere else should be immortal).

The hints are behaving as expected, but the aircraft are not being made immortal. Any ideas?

1 Like