Please add IS ALIVE argument to CLOSET PLAYER and PLAYER WITHIN RADIUS

I want to trigger and kill anyone within radius.
I dont want to retrigger and [not] kill them again every 0.016 seconds when they are already dead.
Consider hero filters and others…
Maybe allow passing players as an array that can be custom filtered though this means more requests nested current value.

1 Like

For players within radius, you can just addFiltered array(Is alive(current array element))

For the closest player to reticule you can add Is alive(Closest player to reticule(Event player, team all)) to the condition
or if you want something that works better, and will just ignore the dead players and target someone else: I made a post about it here

Thank you for the quick reply!

For the filtered array I dont think I can use it because im already in a filtered array :frowning:
For the current player, in a similar way, I would miss if that player is dead but the second closest is alive (which I would want to trigger the rule).

Edit: Read your post. (Sad I cant make a new reply :frowning:)
I looked at your post which nested a lot of Array Filter calls.
Nesting didnt work for me , presumably because my use is slightly more complicated:

Is True For Any
(
    array: Player Variable(Event Player, P)
    condition: Compare
    (
        value: Count Of
        (
            Filtered array
            (
                array: Players Within Radius
                (
                    center: Current Array Element
                    radius: 1
                )
            Condition: Is Alive(Current Array Element)
            )
        )
        > 0
    )
)

I my case the two different usages of current element is in the same function call. In principle it could be made to work same as in your post but it doesnt. I can see why the devs didnt see this corner case and why they wouldnt want to add it if by chance they would read this post :frowning:

Would a rule work looking something like:
Ongoing - Each Player
if (Distance Between (Event Player&Vector) <=4) & (Event Player Is Alive) { Kill Event Player}

Yes but…
More like:
Ongoing each player
For any other player O, if any vector in array P for player O
if distance(event player, element in O.P) < 1 kill event player

so its 3 dimensions,

  • each player,
  • each other player,
  • each point int the other players array P

Im makin something nibbles like so each player get more balls behind them the more scores they have. So each player has an array of ball positions that follow them in their respective variable P.

I have it mostly sorted out: each player EventPlayer looks for AnyElement in their own P such that Count Of(Player Withing Radius Of, Current Array Element) < 1.

So:

  • Ongoing Each Player
  • Any Array Element
  • Count of(Players Within RAdius

each handles 1 dimension.

My remaining issue is that dead players also triggers this :frowning:
I can make the action-list loop with a short wait while condition is true, but this might be expensive.

Try something like First Of ( Filtered Array of (Players Within Radius), Is Alive(Current Element = True))
See if this helps :slight_smile:

The problem is that I want to do this check for many points in an array.
So Current Element is already “taken”/“used” by the Any Of function.
In fact Current Element would be the point/vector argument to Players Withing Radius.