I’ve been messing around with the workshop lately trying to mimic the way Mercy’s old ressurect would work (kind of). But I have one problem, I have no idea how to make an auto-updating (looped) array containing players that are dead AND within a radius of 40 meters. The center being Mercy, I want the array to constantly look for dead players within 40 meters and update itself.
In case you will find yourself in another situation, where you want to check for multiple things in a filtered array, in the future, you can do it like this:
Hello! Thanks for your replies. I’ve ended up trying this code as a condition for a series of custom actions to follow, but it still doesn’t seem to be working.
conditions
{
Number of Dead Players(Filtered Array(All Dead Players(Team Of(Event Player)), Compare(Distance Between(Event Player,
Current Array Element), <=, 5))) > 0;
}
I set the distance to 5 meters for testing purposes, but the rest seems fine to me. Could you help me identify the problem?
Btw, is there a way to spawn a player at a specific distance in front of a player? For example, I want to teleport someone 1 meter in front of me when a certain button is pressed.