Forum Jump :

Author Message


Posts: 5

Level: Member

Country: be
In-game name:

#1 Posted at 2012-06-19 12:01        
Hello, I am trying to add some extra bombs to a harrier(I added him my self & respawn works) in the domination script from Xeno.

but since the harrier a only had unguided bombs I wanted to add some guided bombs(GBU 12) I added the code below to the inif field in the editor.
this addWeapon "BombLauncher"; this addMagazine "6Rnd_GBU12_AV8B";
it worked bombs added, only problem was the respawning, after respawning the added bombs where gone.
so I went to ./x_server/x_helirespawn2.sqf and added this on line 117.
if(_vehicle == "AV8B2"){
    _vehicle addWeapon "BombLauncher";
    _vehicle addMagazine "6Rnd_GBU12_AV8B";

but that broke the script (I believe) since nothing wants te respawn any more
does some has a fix for my problem?

Thank you,

Author Message

Posts: 635

Level: Member

Country: uk
Location: N.W.
Age: 32
In-game name: big_wilk

#2 Posted at 2012-09-02 13:55        
ok soooo

This works for me though i havent tryed it for what your trying to do, this method should work all the same!

I use the simple vehicle repsawn script u can download here

The part of this script that will intrest you is as follows;

veh = [this, Delay, Deserted timer, Respawns, Effect, Static, "INIT"] execVM "vehicle.sqf";

Place that in your vehicles init line after you have edited it to however you want; there are some variables in it that you can set. In the variable called INIT replace with ure: "this addweapon "blah blah"; "this addmagazine "blah "blah";

In my example bellow I have a more complex version that lets the vehicle repsawn with a coustom texture but the principle is the same.

this setObjectTexture [0,"c130\ds1.paa"];this setObjectTexture [1,"c130\ds2.paa"]; veh = [this, 10, 500, 0, FALSE, FALSE, "this setObjectTexture [0,'c130\ds1.paa'];this setObjectTexture [1,'c130\ds2.paa'];"] execVM "vehicle.sqf";

If you need a hand with it i'll wip up an example for your mission

ps very simple way!! there are two types of US harrier jet, one has guided bombs the other has unguided

This post was edited by big_wilk (2012-09-02 15:38, ago)