BIS fnc garage: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\|= " to " ") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.42 | |1.42 | ||
|gr1 = Vehicles | |gr1 = Vehicles | ||
| Splendid Virtual Arsenal Garage<br><br> | | Splendid Virtual Arsenal Garage<br><br> | ||
Line 11: | Line 11: | ||
'''Modes''': | '''Modes''': | ||
*"Open" - Open the Arsenal | *"Open" - Open the Arsenal | ||
**0 (Optional): BOOL - true to open full Arsenal, with all categories and items available (default: false) | **0 (Optional): BOOL - true to open full Arsenal, with all categories and items available (default: false) | ||
| [mode,params] [[call]] [[BIS_fnc_garage]] | | [mode,params] [[call]] [[BIS_fnc_garage]] | ||
|p1= [mode,params]: [[Array]] | |p1= [mode,params]: [[Array]] | ||
|p2= mode: [[String]] | |p2= mode: [[String]] | ||
|p3= params: [[Any]] | |p3= params: [[Any]] | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>["Open",true] [[call]] BIS_fnc_garage;</code> | |x1= <code>["Open",true] [[call]] BIS_fnc_garage;</code> | ||
|x2= <code>[[this]] [[addAction]] ["Open Garage",{ | |x2= <code>[[this]] [[addAction]] ["Open Garage",{ | ||
Line 36: | Line 36: | ||
[ "Open", [[true]] <nowiki>]</nowiki> [[call]] [[BIS_fnc_garage]]; | [ "Open", [[true]] <nowiki>]</nowiki> [[call]] [[BIS_fnc_garage]]; | ||
}]; | }]; | ||
</code> | </code> | ||
|x3= <code>[[this]] [[addAction]] ["Open Garage",{ | |x3= <code>[[this]] [[addAction]] ["Open Garage",{ | ||
Line 51: | Line 51: | ||
</code> | </code> | ||
| [[Arsenal]] | | [[Arsenal]] | ||
}} | }} |
Revision as of 23:02, 17 January 2021
Description
- Description:
- Splendid Virtual Arsenal Garage
Modes:- "Open" - Open the Arsenal
- 0 (Optional): BOOL - true to open full Arsenal, with all categories and items available (default: false)
- "Open" - Open the Arsenal
- Execution:
- call
- Groups:
- Vehicles
Syntax
- Syntax:
- [mode,params] call BIS_fnc_garage
- Parameters:
- [mode,params]: Array
- mode: String
- params: Any
- Return Value:
- Nothing
Examples
- Example 1:
["Open",true] call BIS_fnc_garage;
- Example 2:
this addAction ["Open Garage",{ //Create a position 30 meters infront of the player _pos = player getPos [30,getDir player]; //Create empty helipad at the position and save it in the global variable BIS_fnc_garage_center BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ]; [ "Open", true ] call BIS_fnc_garage; }];
- Example 3:
this addAction ["Open Garage",{ //Create a position 30 meters infront of the player _pos = player getPos [30,getDir player]; //Create empty helipad at the position _vehicle = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ]; //Pass created vehicle to function for use as position ["Open",[ true, _vehicle ]] call BIS_fnc_garage; }];
Additional Information
- See also:
- Arsenal
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on May 31, 2015 - 07:09 (UTC)
- Larrow
- Available namespace variables
missionNamespace BIS_fnc_arsenal_center //copy of BIS_fnc_garage_center BIS_fnc_arsenal_fullGarage //holds param 1 of "open" statement BIS_fnc_arsenal_group //Group spawned vehicle is created in, default players group BIS_fnc_arsenal_type //--- 0 - Arsenal, 1 - Garage BIS_fnc_garage_center //Hold a reference to an OBJECT of where to spawn selected garage vehicle BIS_fnc_garage_centerType ?//default selected vehicle model from config bis_fnc_garage_data //Array of vehicles for garage tabs - see below BIS_fnc_garage_turretPaths ? [] uiNamespace BIS_fnc_arsenal_cam //null if arsenal is not open else holds reference to arsenal display BIS_fnc_arsenal_toggleSpace ? bis_fnc_garage_defaultClass //Default class to display BIS_fnc_garage_stats //min and max values of config ["maxspeed","armor","fuelcapacity","threat"] of cfgVehicles >> crew
Available scripted eventHandlers//[ namespace event is stored in, event name, passed variables ] [ missionnamespace, "garageOpened", [ _display, _toggleSpace ] ] [ missionNamespace, "garageClosed", [ displaynull, uinamespace getvariable [ "BIS_fnc_arsenal_toggleSpace", false ] ] ]
Structure of BIS_fnc_garage_dataBIS_fnc_garage_data = [ //CARS [ //model "\a3\soft_f\offroad_01\offroad_01_unarmed_f", //config paths of classes that use above model [ config.bin/CfgVehicles/C_Offroad_01_F, config.bin/CfgVehicles/B_G_Offroad_01_F ], "\a3\soft_f\mrap_02\mrap_02_gmg_f", [ config.bin/CfgVehicles/O_MRAP_02_gmg_F ] ], [], //ARMOR [], //HELIS [], //PLANES [], //NAVAL [] //STATICS ]
- Posted on May 1, 2018 - 14:40 (UTC)
- .kju
-
The above overview isn't fully correct:
- BIS_fnc_garage_centerType returns by default the model path of the "default class"
gettext (configfile >> "cfgvehicles" >> _classDefault >> "model")
yet once a vehicle is selected it returns its class name. - BIS_fnc_garage_center returns by default the player reference, yet otherwise the created vehicle object
- BIS_fnc_garage_centerType returns by default the model path of the "default class"