OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 16 Jun 2004, 19:53:56
-
I've seen this in "script1.sqs" :
#label1
... code... more code...
#label2
... code... more code...
Then in another script in the same mission I saw this :
["label2"] exec "script1.sqs"
I found this executes the code started from #label1 in script1.sqs. Interesting... I wanna know more... :)
Can I add more parameters?
like this :
["label1", mygrp] exec "script1.sqs"
Is "label1" or mygrp the first parameter in the exec array?
-
Indeed. This cuts down the number of files/global variables in your mission.
All you need to is to exec the script like you have it there and put
_bookmark = _this select 0
goto _bookmark
in the begining of the script.