Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2015-04-03 02:44        
     
I would like to make a script to change the armorment on something like jets.

how it would work is to drive up to say a hemtt with this script attached and be able to select between multiple loadouts for that vehicle with the scroll menu

that being said i can do the rearming the vehicle part i just need to know 1 things how do i make the hemtt interact with the vehicle the players in.

not the best at arma scripting but i've coded in many languages before im fluent in things like lua and c++/c# but armas a whole new beast for me.


Author Message


Posts: 83
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: J.Shock

 
#2 Posted at 2015-04-09 22:50        
     
Should be as simple as adding actions to the Hemtt for each of the types of loadouts where you have a seperate script for each type of loadout (you could condense it down to one script and just mess with a parameter or two and use a switch statement):

https://community.bistudio.com/wiki/addAction

this addAction
[
	"Loadout 1",
	"loadout1.sqf",
	[],
	6,
	true,
	true,
	"",
	"(_this distance _target < 15) && ((vehicle _this) isKindOf 'Air')"
];

this addAction
[
	"Loadout 2",
	"loadout2.sqf",
	[],
	6,
	true,
	true,
	"",
	"(_this distance _target < 15) && ((vehicle _this) isKindOf 'Air')"
];

this addAction
[
	"Loadout 3",
	"loadout3.sqf",
	[],
	6,
	true,
	true,
	"",
	"(_this distance _target < 15) && ((vehicle _this) isKindOf 'Air')"
];

John Shock
Scripter, Mission Developer

My scripts: Simple Mortar Script, Redressing Script, Cruise Control Script

My Missions: [COOP-40]Operation Bloody Bayonet