Sure, just add it into condition and action.
Can you do it?
Emm, nevermind.
Try this code
variables
{
player:
0: CurrentTarget
1: CheckingFlagA
2: NewTarget
}
rule("Aiming closest alive player with variable A set to True")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is True For Any(All Living Players(All Teams), And(Compare(Event Player, !=, Current Array Element), And(Compare(Player Variable(
Current Array Element, CheckingFlagA), ==, True), Compare(Is In Line of Sight(Event Player, Current Array Element,
Barriers Do Not Block LOS), ==, True)))) == True;
}
actions
{
Set Player Variable(Event Player, NewTarget, Sorted Array(Filtered Array(All Living Players(All Teams), And(Compare(Event Player,
!=, Current Array Element), And(Compare(Player Variable(Event Player, CheckingFlagA), ==, True), Compare(Is In Line of Sight(
Event Player, Current Array Element, Barriers Do Not Block LOS), ==, True)))), Distance Between(Event Player,
Current Array Element)));
Skip If(Compare(Player Variable(Event Player, CurrentTarget), ==, Player Variable(Event Player, NewTarget)), 2);
Set Player Variable(Event Player, CurrentTarget, Player Variable(Event Player, NewTarget));
Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Player Variable(Event Player,
CurrentTarget))), 100, To World, Direction and Turn Rate);
Wait(0.500, Ignore Condition);
Loop If Condition Is True;
Stop Facing(Event Player);
}
}
Cannot test it for real working but it is how I see a solution.
More info about me and my game mods you can find here.