Home   Help Search Login Register  

Author Topic: Help me with the simple script  (Read 441 times)

0 Members and 1 Guest are viewing this topic.

dragonshinobi03

  • Guest
Help me with the simple script
« 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.
Code: [Select]
_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

_hammy_

  • Guest
Re:Help me with the simple script
« Reply #1 on: 06 Feb 2004, 00:36:10 »
Please dont use the text glow, it hurts my eyes :)

Code: [Select]
_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
« Last Edit: 06 Feb 2004, 00:36:38 by HAMMY »