Jump to content
Sign in to follow this  
Moon_chilD

Limit the Garage in Multiplayer and determine the spawning position!

Recommended Posts

Hey guys,

since the Arsenal is out my group uses this command line to use it ingame:

this addaction ["<t color='#1C56D3'>Arsenal</t>",{["Open",true] call BIS_fnc_arsenal}];

Now we want to use this for spawning vehicles with the garage:

this addaction ["<t color='#1C56D3'>Garage</t>",{["Open",true] call BIS_fnc_garage}];

The problem is, there seems to be a fixed spawning position for every vehicle class so its not easy to determie where a vehicle is spawned.

Is there a way to dertermine a spawning position for these vehicles?

Also I'd liek to limit the Arsenal to lets say, only Armor from BLUFOR.

Is that possible?

Many Greetings

Moony

Share this post


Link to post
Share on other sites

highly likely its impossible to use arsenal or virtual garage in any feasible way really outside of its mission as its scripted just to function in its mission and it wasnt made to be used any other way.

Share this post


Link to post
Share on other sites

Sorry to say, but the Arsenal work like a charm in EVERY mission I make! So saying that not only "Garage" but also "Arsenal" is not working outside the Virtual Arsenal is not right! ^^"

Share this post


Link to post
Share on other sites

Garage is undocumented on the wiki (https://community.bistudio.com/wiki/BIS_fnc_garage). Nice system, just like Arsenal, but lacking documentation that makes it usable. All I want to know is how to get it to spawn objects in an appropriate location rather than on top of my head. My guess is that it is not ready for prime time. I hope they do update it as it eliminates the need for extra scripts, Just like Arsenal.

Share this post


Link to post
Share on other sites

BIS_fnc_garage_center needs to be given an object of where you want your vehicles to be created.

this addaction ["<t color='#1C56D3'>Garage</t>",{
_pos = [ player, 30, getDir player ] call BIS_fnc_relPos;
BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];
["Open",true] call BIS_fnc_garage;
}];

OR

this addaction ["<t color='#1C56D3'>Garage</t>",{
_pos = [ player, 30, getDir player ] call BIS_fnc_relPos;
spawnSpot = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];
["Open",[ true, spawnSpot ]] call BIS_fnc_garage;
}];

Edited by Larrow

Share this post


Link to post
Share on other sites

Quote myself from the other thread :/

Getting there

//Open garage with vehicle spawn position
this addaction [ "<t color='#00FF00'>Garage</t>",{
_pos = [ player, 30, getDir player ] call BIS_fnc_relPos;
BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];
["Open",true] call BIS_fnc_garage;
}, [], 1, true, true, "", "isNull cursortarget"];


//Open garage to edit vehicle your looking at
this addaction [ "<t color='#FF0000'>Edit Vehicle</t>",{
BIS_fnc_garage_center = cursorTarget;
uinamespace setvariable ["bis_fnc_garage_defaultClass", typeOf cursorTarget ];
["Open",true] call BIS_fnc_garage;
}, [], 1, true, true, "", "!( isNull cursortarget ) "];


//Open garage with custom vehicle list
this addaction [ "<t color='#0000FF'>CustomGarage</t>",{
BIS_fnc_garage_data = [
	[
		'\a3\soft_f\mrap_01\mrap_01_unarmed_f',
		[ ( configFile >> 'cfgVehicles' >> 'B_MRAP_01_F' ) ]
	]
];
_pos = [ player, 30, getDir player ] call BIS_fnc_relPos;
BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];
["Open",true] call BIS_fnc_garage;
h = [] spawn {
	waitUntil { isNull ( uinamespace getvariable ["BIS_fnc_arsenal_cam",objnull] ) };
	BIS_fnc_garage_data = nil;
};
}, [], 1, true, true, "", "isNull cursortarget"];

Does as an rough example, need to do some fine tuning :D lol

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  

×