Can anyone help me to trim this scrop[t down some? It works, after much frustration, but it is cumbersome to type and I haven't even completed 1 side much less both! It is called from an anyone trrigger and all the units are named "s1" etc and "n1" etc There must be an easier way in 1.46. This does get rid of pesky ai units tho!
?!(local server):exit
~5
#jail
jailarray=["s1","s2","s3","s4"]
~5
hint "goto Jail"
?(s1==player):goto "s2"
"s1 setpos [9575,4100,0]" foreach jailarray
[s1] join grpnull
#s2
?(s2==player):goto "s3"
[s2] join grpnull
"s2 setpos [9575,4100,0]" foreach jailarray
#s3
?(s3==player):goto "s4"
"s3 setpos [9575,4100,0]" foreach jailarray
[s3] join grpnull
#s4
?(s4==player):goto "end"
[s4] join grpnull
"s4 setpos [9575,4100,0]" foreach jailarray
goto "jail"
#end
~5
hint "all were a player"