OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 22 Jun 2004, 21:47:58
-
I have a group running a script with a bolean.
Alert = true
When I have a second group standing somewhere else and running the same script, the event that's executed by the bolean will ocour on both locations.
What can I do to prevent this without running a new script (with a new bolean) for each group?
Can I add a number to a boleanname?
like Alert1,Alert2, alert3,...
And updating the number via a variable?
_c = 0
...
_c = _c + 1
Hmmm, I think I need a format call command but I don't know the exact code...
Or can I have a boleanname as parameter in the exec array?
Help!
-
Is it for Multi Player or Single player?
Multi Player use the call command, single player use a global array.
Give each group an index number. Then for the Call command you can have:
Your.sqs
_Index=_This Select 0
Call {Format ["Alert%1=True",_Index]}
Or for an array:
Init.sqs
Alarms=[False,False,False]
Your sqs:
_Index=_This Select 0
Alarms Set [_Index,True]
-
Nice one !
It's for SP.
Thanks a lot!