Players within radius and and effects

I’m trying to put an effect on all players within a radius of the Event Player.
I tried doing this:

actions
    {
    	Create Effect(All Players(All Teams), Baptiste Immortality Field Protected Effect, Team Of(Event Player), Players Within Radius(
    		Event Player, 6, Team Of(Event Player), Surfaces And Enemy Barriers), 6, Visible To Position and Radius);
    }

I thought this would be enough, but what’s doing is that it only puts the effect on one random player within the 6 meters. I guess this is because Players Within Radius is an array and its only detecting the first player on said array. The question is, how do I get to put the effect on all the players on the array?

Thanks!

You would have to either:

  • Loop through all the players within radius and place the effect for each one of them (least effort, but more complicated);
  • create a player variable like hasEffect, set it to True for all nearby players, and in an Ongoing - Each Player rule where the condition is whether the variable is true, create the effect (bit more effort, but not as complicated);
  • or in an Ongoing - Each Player rule that executes at the start of the game, create the effect, but make it only visible if they’re within the radius. (this one will only work depending on what the effect will show).
2 Likes

Thank you so much! I ended up using the second one.