Author: katsuobusi24
Author Website:

Requirements:

Version: 1.0

Short description: This script is a vehicle spawner for tesing or practicing vehicles and pylon weapons.

Date: 2021-03-05 10:20


Comments: (0)
Rating:



 







Garage Spawner with Dynamic Vehicle Loadouts

by
Katsuobusi24


Description:
This script is a vehicle spawner for tesing or practicing vehicles and pylon weapons.
This script is based on DCON's Multiplayer Vehicle Spawner.

DCON's Multiplayer Vehicle Spawner


Features:
- Can open the Virtual Garage with Dynamic Vehicle Loadout that almost same as in 3DEN Editor in missions.
- Can use with MOD vehicles (CUP, RHS, Unsung etc...).
- Both of SP/MP (I have only tested on player hosted server, not on dedicated server.)
- The Garage will be disabled when vehicles exist within 20m of the spawner and when someone open the garage in same place in multiplay.
(If no one open the garage, but you can't open the garage, please use "Reset Garage Flag" for reset the flag.)
- The spawning point is defined by a object position.
- Automatically add markers of spawning point and its effective area. The display name can be set by its variable name.
- Can select the spawn type from "Only Spawn", "Get in", "Flying".
("Flying" is only available to planes and helicopters. If you use it on other vehicle types, same as "Get in".)
- Can select vehicle types available in the spawner.
- Can spawn a vehicle with crew selected in Garage. You can set type of spawning unit in "kbf\fn_garageCrew.sqf".
- Can execute additional script when spawning a vehicle.
In demo mission, it will execute the additional script that will delete the spawning vehicle destroyed or deserted for a certain period.
- Add a action of deleting spawn point vehicle. But setting variable name "DFV_(some name)", the action can't delete these objects.


Installation / Usage:
Put kbf folder and description.ext in your own mission folder.
If another description.ext already exist in it, copy contents and paste it in another description.ext.

Put this command in the object add actions.
Syntax
[this, spawn point object, spawn types, display distance, additional script] call kbf_fnc_garageInit;

Parameters
- this : this only. Don't change it.
- spawn point object : Object - the variable name of vehicle spawning point.
- spawn types : Array of Strings -(Optional, default ["Auto"]) Available types in the spawner. If ["Auto"], types will be decided by spawn point surface.
Available strings of types = "All", "Auto", "Ground", "Car", "Tank", "Helicopter", "Plane", "Ship", "StaticWeapon"
- display distance : Number -(Optional, default 10) Distance(m) of adding actions to player.
- additional script : String -(Optional, default "") Additional script that will be executed when spawning a vehicle.

Examples
[this, GP_Airport] call kbf_fnc_garageInit; //The name of this spawner will be "Airport". And its selections depending on spawner surface.
[this, GP_Airport_1, ["Car", "Tank"]] call kbf_fnc_garageInit; //It will be "Airport 1". And can select only cars and tanks.
[this, GP_USS_Freedom, ["Ground"], 5] call kbf_fnc_garageInit; //It will be "USS Freedom". And can select except ships, and display action within 5m of calling object.
[this, GP_USS_Freedom, ["Auto"], 10, "[some params] execVM 'yourscript.sqf'"] call kbf_fnc_garageInit; //It will execute "yourscript.sqf" when you spawn a vehicle.


Known issues:
- Error occur when you change selection too fast. Because the script can't finish processes in time.
- In Pylon settings of 3DEN Editor, turrets of RHS Tu-95 can be set as driver, gunnner and Navigation Plotter.
But I haven't understood how to do that. So I now ignore it.


Future plans:
- Adding insignia to vehicles.
- Setting of fuel, damage and other things.


Credits & Thanks:
Yuruyaka ARMA3 club's member - For help debugging


Changelog:
1.0
- First upload




Enable javascript to be able to download from Armaholic please!