Jump to content
Sign in to follow this  
Platoon RedHawk

How can you activate scripts within a pbo file?

Recommended Posts

I am putting together a mission and I need your help.  What I want to happen is to have the Transport plane fly over the island and eject the paratroops.

I am using Hawk C-130 V1.3 addon as the drop plane and the kmk Move AC Script in controlling the aircraft.  I can get me and my paratroopers to ejects, but its a single point drop and sometimes they die as they "stack up" or don't match up with thier chute and fall to earth.   I would like to drop them in a stick.

In the Group leader Ini Field I have the following; {_x moveincargo vAC} foreach units group this;

At the dropzone I have a trigger with the following; {_x action["EJECT",vAC]} foreach units group player

I de-pbo the HWK_C130.PBO addon and it has a script in it, located: SCRIPT\parasoldiers.sqs

The parasoldiers.sqs contains the following:

---------------------------------------------------------

_helo = _this select 0

_allcrew = crew _helo

? (count crew _helo)<=2:exit

(group _helo) setspeedmode "limited"

_helo sideChat "Approaching Drop Zone, Jumpers hook lines, check your gear and get ready to jump"

[_helo] exec "\HWK_c130\script\openramp.sqs"

_helo animate["jumpprepare",1]

_helo animate["r1",1]

_helo animate["r2",1]

_helo animate["r3",1]

~3.1

_helo sideChat "Jump in 10 seconds"

~5

_helo sideChat "5 seconds"

~5

_helo animate["r1",0]

_helo animate["r2",0]

_helo animate["r3",0]

_helo animate["g1",1]

_helo animate["g2",1]

_helo animate["g3",1]

_helo sideChat "Green Light, Green Light, GO, GO, GO"

_helo say "eng20"

_array = []

"if (_x != driver _helo && _x != gunner _helo) then {_array = _array + [_x]}" foreach _allcrew

_allcrew = _array

? count _allcrew == 0 : goto "done"

_c = 0

#eject

_helo sideChat format ["%1, GO",_allcrew select _c]

unassignvehicle (_allcrew select _c)

(_allcrew select _c) action ["getout",_helo]

~0.1

_chute = "ParachuteWest" createvehicle [0,0,10]

_chute setpos (getpos (_allcrew select _c))

(_allcrew select _c) setvelocity (velocity _chute)

(_allcrew select _c) setpos (getpos _chute)

(_allcrew select _c) moveindriver _chute

~0.5

_c = _c + 1

? _c != count _allcrew : goto "eject"

~10

_helo animate["g1",0]

_helo animate["g2",0]

_helo animate["g3",0]

_helo animate ["jump",0]

_helo animate ["jumpprepare",0]

[_helo] exec "\HWK_C130\script\closeramp.sqs"

exit

---------------------------------------------------------

Is there a way to activate the script with a trigger?  I so how?  If this is possible how can I activate the scripts within it.  I had no readme fill.  Thanks in advance.

Aircraft is named: vAC

Share this post


Link to post
Share on other sites

i think this is what ur looking for

this exec "addonname/scriptfoldername/Scriptname.sqs"

Share this post


Link to post
Share on other sites

bit wrong

[this] exec "\HWK_C130\SCRIPT\parasoldiers.sqs"

first one is the PBO-Name, following is the path inside the pbo. notice the slash in front.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×