Scripting Handout 1
OPFOR camp response script

>>> SCRIPT BEGINS BELOW <<<

;east_respond.sqs
;this handles some messages that occur throughout the mission.
;It is for the east camp

;this script begins when the west is spotted
;it works in synch with a couple triggers that activate when a 
situation has occurred

_radiosource = radio_east

;set flags for various occurrences
;0 is false, 1 is true, -1 is for when the message has already been 
sent
patroldead = 0
campdead = 0
flankersfound = 0


_radiosource sidechat "There are enemy troops moving in from the 
Southeast!"
#loop1
?(campdead > 0):goto "campgroupdead"
?(patroldead > 0):goto "patrolgroupdead"
?(flankersfound > 0):goto "flankersspotted"
~1
goto "loop1"

#patrolgroupdead
_radiosource sidechat "I've lost contact with forward defense line. 
They're all dead!"
patroldead = -1
goto "loop1"

#campgroupdead
_radiosource sidechat "Everyone at the camp is dead, we've taken heavy 
losses!"
campdead = -1
goto "loop1"

#flankersspotted
_radiosource sidechat "More troops are coming in from the ridge on the 
West!"
flankersfound = -1
goto "loop1"

