The basic system is a trigger that keeps relocating to various towns. At each town if the trigger condition is met, "G_Alert" boolean becomes true.
This boolean is part of a line that allows a script to be run.
The second part of that line is another boolean, which is specific to the location the trigger is at. It is this second boolean that i need to manipulate
The actual town that the trigger is at, then runs a script. However, on the triggers next pass at the town, if the triggered script is still running, then i dont want the trigger to call a second instance of it
So i am wanting to initate a boolean check to exit the script at its start, if an additional script is called
Following is a much more simplified version of what i need, but the basic concept is there
The red highlighted text are the specific boolean relevant lines
eg (INIT.SQS)town_bools = [G1t1_alert,G1t2_alert,G2t1_alert,G2t2_alert]
{_x = false} forEach town_bools
G1_town1 = [G1t1_flag,G1t1_alert]
G1_town2 = [G1t2_flag,G1t2_alert]
G1 = [G1_town1,G1_town2]
G2_town1 = [G2t1_flag,G1t1_alert]
G2_town2 = [G2t2_flag,G1t2_alert]
G2 = [G2_town1,G2_town2]
Garrisons = [G1,G2]
Monitor.sqs;;Setposses the west detected by east town trigger to cycle through all the towns in a garrision
?! (local server): exit
~ random 5
#START
_GNo = 0
_Gcount = count (Garrisons)
_TNo = 0
goto "G_Loop"
#G_Start
_GNo = _GNo + 1
#G_Loop
? (_GNo >= _Gcount): _GNo = 0; goto "Start"
_selectedG = (Garrisons select _GNo); goto "T_Loop"
#T_Start
_TNo = _TNo + 1
#T_Loop
_Tcount = count (_selectedG)
? (_TNo >= _Tcount): _TNo = 0; goto "G_Start"
_selectedT = (_selectedG select _TNo); goto "TOWNcheck"
#TOWNcheck
G_Alert = false
_selectedFlag = (_selectedT select 0)
_bool = (_selectedT select 1)
?(_bool): hint "Boolstate is true"; goto "T_Start"
_Flag = (getpos _selectedFlag)
T_Trigger setpos _flag
"Triggermarker" setmarkerpos (getpos T_Trigger)
~ (2 + (random 2))
? (G_Alert) && !(_bool): hint "Boolstate is false"; _selectedT exec "myscript.sqs"
goto "T_Start"
Myscript.sqs_bool = _this select 1
?(_bool): exit
_bool = true
;;;(Do other non relevant stuff)
~60
_bool = false
(_this select 1) = _bool
exit
Problem1?(_bool): hint "Boolstate is true"; goto "T_Start"? (G_Alert) && !(_bool): hint "Boolstate is false"; _selectedT exec "myscript.sqs"neither of these lines run the hint message, which basically means that the variable _Bool isnt being seen as a boolean
How do i correctly do this??
Problem2How do i make "Myscript.sqs" change the array boolean from false to true and vice versa
NB>> when the system is working, there may be multiple instances of "Myscript.sqs" running, but called by different towns, so the use of global variables may become messy
Thanks in advance