My brain is a bit fuddled. I know how to give a named individual a switchmove to do when they are killed. What I want to do is to give the switchmove to a batch of units that don't have individual names or at least I don't know what they are.
I have tried:
{_x addEventHandler ["Killed",format ["%1 ",_x]+{switchMove "FXStandSurDead"}]} forEach units infGrp
I get an error:
WEST |#|Bravo Black 7 switchMove "FXStandSurDead": Error unknown operator Bravo
{_x addEventHandler ["Killed",format ["%1 switchMove {FXStandSurDead}",_x]]} forEach units infGrp
Gives exactly the same result
This works for a single named unit:
unitname addEventHandler ["Killed",{unitname switchMove "FXStandSurDead"}]
I am losing the will to live.