OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dragonshinobi03 on 06 Feb 2004, 00:27:47
-
Hi i am new to the whole scripting and i was wondering if someone woul;d tell me what this script does and what each line does or mean.
_Group = _this select 0
_Vehicle = _this select 1
_listunits = units _Group
_A = 0
_B = count _listunits
#KEEPSENDING
_listunits select _A action ["EJECT", _vehicle]
Unassignvehicle (_listunits select _A)
_A=_A+1
~1
?_B >_A:goto "KEEPSENDING"
~1
MoveNext = TRUE
-
Please dont use the text glow, it hurts my eyes :)
_Group = _this select 0
_Vehicle = _this select 1
; states the parameters to exec the script ie: [group, vehicle] exec "hammy.sqs"
_listunits = units _Group
; Saves the units that are in the variable group in a variable
_A = 0
; set A as zero
_B = count _listunits
; count the units in the listunits variable
; Loop
#KEEPSENDING
_listunits select _A action ["EJECT", _vehicle]
; add the action Eject to each unit in group
Unassignvehicle (_listunits select _A)
; unassign the vehicle from the units
_A=_A+1
; add 1 to A
~1
;wait one second
?_B >_A:goto "KEEPSENDING"
; check if B is greater than A if it is, then goto the Label KEEPSENDING and begin the loop
~1
; wait one second
MoveNext = TRUE
; set the global variable movenext to true