Modifying Damage Need Help

I’m trying to make it so players can only damage a player who is their “Target” but I’m having trouble setting up the Damage modifiers.

At the beginning of the game I have a “Start Damage Modification” Setting both Damagers and Receivers as All Players and set the Percent to 0. No one can damage anyone and It works great.

The game then decides your Target player which works and assigns the player to the player variable “Target”.

After setting the Target, I stop all damage modifiers then immediately create a new Damage Modifier. It looks like this (keep in mind I’m using the in game UI for this and not raw code):

Action : Start Damage Modification
Receivers : Filtered Array
Array : All Players / Team / All
Condition : Compare
Value : Current Array Element
!=
Value : Player Variable / Event Player / “Target”
Damagers : Event Player
Damage Percent : number : 0
Reevaluation : Recievers, Damagers, and Damage Percent

I assumed this would set the damage to 0 unless you damaged your target, but in game, everyone can damage anyone. Any ideas as of to what I’m doing wrong?

Edit: Realized Title was misleading, updated Title

Try instead of “filtered array” use “remove from array, player variable (target)”.

2 Likes

This worked perfectly. Thank you very much

1 Like