Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Default BattleBus Vehicle not set
- _car = objNull;
- TC_BB_removeBus = {
- _car = missionNamespace setVariable ["battleVic", objNull];
- };
- TC_BB_addBus = {
- params["_selectedVehicle"];
- _car = missionNamespace setVariable ["battleVic", _selectedVehicle];
- player addAction["Remove Selected Vehicle", "call TC_BB_removeBus"];
- };
- //Object Placement Controller, BATTLE BUS SYSTEM ATTACHED
- TC_ObjectHandler = ["acex_fortify_objectPlaced", {
- params ["_player", "_side", "_objectplaced"];
- //Only run for player
- if !(local _player) exitWith {};
- _car = missionNamespace getVariable ["battleVic"];
- //If the object is a turret weapon, then don't simplify it.
- //In the current set up static weapons can't be attached to vehicles, I want weapons to be attachable to vics
- if (_objectplaced isKindOf 'RHS_M2StaticMG_D' or _objectplaced isKindOf 'RHS_TOW_TriPod_D') exitWith {};
- //If there is a value for vehicle, then attach objects relative to that.
- if !(isNull _car) exitWith {
- [_objectplaced, _car] call BIS_fnc_attachToRelative;
- };
- //Any object placed that is not a turret or attached to a vehicle should be replaced with a simple object.
- if !(isNull _objectplaced) exitWith {
- //This Does NOT work
- systemchat str _objectplaced;
- private _ObjLoc = getPOSASL _objectplaced;
- deleteVehicle _objectplaced;
- createSimpleObject [_objectplaced,_ObjLoc];
- //This works, but objects don't get placed exactly where they should.
- //[_objectplaced] call BIS_fnc_replaceWithSimpleObject;
- };
- }] call cba_fnc_addEventhandler;
- //Slap this on vehicle that can be selectable for a Battle Bus
- // _action = ["BBSelect","Battle Bus Select Vehicle","Hair128x128.paa",{[_this] call TC_BB_addBus},{true},{},[], [0,0,0], 100] call ace_interact_menu_fnc_createAction;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement