Home   Help Search Login Register  

Author Topic: whats the syntax for this script  (Read 451 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
whats the syntax for this script
« on: 16 Jan 2005, 23:09:46 »
i have a nice script a really cool guy gave me but im not good at scripting so could sombody plz tell me what i use to exec it in the triggers activation field

Code: [Select]
_teamleads = _this select 0
_craft = _this select 1
_crewexit = _this select 2

?(_craft in attacked) : exit

_crafttype = typeof _craft
_pilot = driver _craft
_gunner = gunner _craft
_units = []
_cnt = 0
_teamcnt = count _teamleads
#unitegroups
_grp = group (_teamleads select _cnt)
_grp SetBehaviour "combat"
_unitgrp = units _grp
_units = _units + _unitgrp
_cnt = _cnt + 1
?(_cnt < _teamcnt) : goto "unitegroups"

?(_crewexit) : _units = _units + [_gunner, _pilot]

_unitcount = count _units

_craft land "land";

#landing
~.5
_z = getpos _pilot select 2;
?(attacked) : _craft flyinheight 35;  exit
?(_z > 4): goto "landing"

loaded = false

?(_crewexit) : [_gunner] join grpnull; [_pilot] join grpnull ; (group _pilot) SetBehaviour "combat";  (group _gunner) SetBehaviour "combat";  

~3

_anginc = 360 / _unitcount
_dis = 15
_cnt = 0

#Unload
_delay = 4
_unit = _units select _cnt
_unit action["getout",_craft]
unAssignVehicle _unit

;**********************************************************
; These lines particular to "rear ramp" exiting.  Coment them out for ohter tpyes.
_pos = [_craft,35,180,3] call AngDirDisOff
_unit setpos _pos
;**********************************************************

;**********************************************************
; These lines conflict.  For rear ramp exiting, comment out the first line, otherwise coment out the second.
;_dir = [_craft,_unit] call DirOff
_unit setDir  (getDir _craft + 180)
;**********************************************************

?(_unit == player) : _delay = 3; Hint "You are to cover off the nose of the craft in the direction it is facing."; goto "skip"
_pos = [_craft,0,180,10] call AngDirDisOff
_unit doMove _pos
~3
_ang = _cnt * _anginc
_pos = [_craft,0,_ang,_dis] call AngDirDisOff
_unit doMove _pos
_pos = [_craft,0,_ang,(_dis+100)] call AngDirDisOff
_unit doWatch _pos
#skip
~_delay
_cnt = _cnt + 1
?(_unitcount > _cnt): goto "Unload"

@unitready _unit

[_gunner] join group _pilot

exit

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:whats the syntax for this script
« Reply #1 on: 16 Jan 2005, 23:10:55 »
What is the script supposed to do?
Plenty of reviewed ArmA missions for you to play

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:whats the syntax for this script
« Reply #2 on: 16 Jan 2005, 23:18:18 »
lol shuda said that.

it will make a cargo vehicle w/ a cargo door like the BAS chinook or a  ww2 landing craft make all the men in the cargo charge out instead of being setposed out side of it.

thanks

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:whats the syntax for this script
« Reply #3 on: 17 Jan 2005, 00:29:32 »
it appears to be:
[leaders of each group to run out,vehicle,all of the people who will run out]

Silencer

  • Guest
Re:whats the syntax for this script
« Reply #4 on: 17 Jan 2005, 01:36:02 »
So you put:

[Name of groupleader,aircraftname,people who will run out] exec "nameofscript.sqs"

in the activation field from a trigger/init field of a unit.