I have a problem with a script in my mission (below).
It is meant to make the enemy (one squad of 9 plus 8 assorted sentries in ones and twos) retreat in the event of taking ten or so casualties. Then a helo from your side is called in to track them to their base while you search the site of the battle.
It works, almost
.
The sideChats after the line' "3" objStatus "Done" ' display three times and I have no idea why - can anyone help? Once fixed I can put the mission up for beta testing.
Ade
SCRIPT
;Script to make the special forces leg it if they start taking heavy casualties
;Col Stankovic will send a recon helo to locate the survivors
;Mark objective complete if player has killed most enemies and is within the camp
#checkNumbers
if (West CountSide ade_sf_array <7) then {goto "Retreat"}
goto "checkNumbers"
#Retreat
;should make some of the survivors defend and the others run, a kind of messy fighting retreat
adeambush1 setCombatMode "GREEN"
adeambush1 setSpeedMode "FULL"
"_x doMove getpos rallyPoint" forEach ade_sf_array
~1
"3" objStatus "DONE"
obj3=true
player sideChat "HQ, enemy is falling back. Please advise"
~4
Stankovic sideChat "Alpha Black, I'm dispatching a recon helo. He'll search near you and will try to locate the enemy hideout. If he finds it, proceed there and mop up any survivors."
~6
defeat = 1
adehelo flyInHeight 75
adehelo setSpeedMode "FULL"
adehelo sideChat "This is Eagle Eye 1. En route now. ETA 2 minutes."
hintCadet "Wait for the helicopter pilot to report back."
exit