Jump to content

doubleblind

Member
  • Content Count

    60
  • Joined

  • Last visited

  • Medals

Everything posted by doubleblind

  1. I'm trying to retexture the armor on the VR suit. I went through the config and pulled the \a3\characters_f_bootcamp\common\data\vrarmor_co.paa texture and modified it, but I can't get it to show up in game using: this setObjectTexture [3,"myTexture.paa"] in the unit's init. All other textures on the suit work, I just can't change the armor. Anybody know what the issue is?
  2. Is there a specific way to delete destroyed (script-spawned) buildings such as cargo posts or cargo house? I'm trying to write a cleanup script but it fails to delete buildings such as the cargo post if they've been destroyed.
  3. Hello all, I'm trying to make a custom ammunition type (armor-piercing) and allow vanilla and Apex weapons to use it. I can get the magazine and a weapon modified to use the magazine into the game and the weapon, but when loaded with my armor-piercing mag, the weapon won't fire. Reloading with a vanilla mag allows the weapon to fire again, so I think the problem is in the magazine or ammunition config. This is my first crack at this so I have no idea what's going wrong; I googled around a bit as well and came up empty. Can anybody see what I'm doing wrong or suggest ways to fix it? Here is my config: class CfgPatches { class PO_Weapons { addonRootClass = "PO"; requiredVersion = 0.1; requiredAddons[] = {"PO"}; units[] = {}; weapons[] = {}; }; }; class CfgAmmo { class BulletBase; /////////////////////////////////////////////////////////////////////////////////////////////////////////// class CH_545x39_AP : BulletBase { hit = 3.5; }; }; class CfgMagazines { class 30Rnd_545x39_Mag_F; /////////////////////////////////////////////////////////////////////////////////////////////////////////// class CH_30Rnd_545x39_AP_F : 30Rnd_545x39_Mag_F { ammo = "CH_B_545x39_AP"; displayName = "5.45 mm 30Rnd Armor-Piercing Mag"; displayNameShort = "AP"; lastRoundsTracer = 0; }; }; class CfgWeapons { class arifle_AKS_F; /////////////////////////////////////////////////////////////////////////////////////////////////////////// class CH_arifle_AKS_F : arifle_AKS_F { magazines[] = {"30Rnd_545x39_Mag_F","30Rnd_545x39_Mag_Green_F","30Rnd_545x39_Mag_Tracer_F","30Rnd_545x39_Mag_Tracer_Green_F","CH_30Rnd_545x39_AP_F"}; }; }; Thanks!
  4. doubleblind

    [Help] Custom Magazine Won't Fire

    Well then, I'm an idiot. Thanks for pointing that out, it works now.
  5. Hi everyone, I would like to include a head- or shoulder-mounted flashlight for players in a mission I'm making. I can create a light source using something like: _light = "#lightpoint" createVehicle (position player) and associated commands, but the light created is a 360 degree emitter. I have no idea how to make a conical light like the weapon light or attach it to the player's head such that it moves as the player uses freelook. Can anybody help me out with this?
  6. When setting arrays in a config class, you need to include [] before the equals sign. In your case, change lines 3 and 4 to: units[] = {}; weapons[] = {}; and see what happens.
  7. I'm a scripter working on my first addon and I'm running into an issue including functions in said addon - Addon Building isn't including my functions sub-folders when creating a binarized PBO. My folder structure is as follows: I have a root folder, PO, which has a config.cpp for the whole addon. I have a functions sub-folder with its own config.cpp (the CfgPatches entry is showing up fine in the config viewer) with further sub-folders organizing functions. These organizing sub-folders are the ones not making it into the addon. De-PBOing the addon after packing shows the functions sub-folder only containing a config.bin file, no sub-folders of any kind. Has anybody had a similar issue and know a solution?
  8. I'm using the Addon Builder from Arma 3 Tools.
  9. doubleblind

    Delete Destroyed Building

    @killzone_kid Thank you! Looks like that EH was just released - I didn't even know it exists!
  10. I took a look at it, l34dKarma's demo mission seems to be having similar problems to what I'm seeing: Makes me think that an update between l34dKarma's publishing and now broke the bar gate placement. Thanks for the pointer though, it's good to know that it's not necessarily my math that's the problem.
  11. Hey everybody, I'm getting pretty close to finished on improved versions of the BIS_fnc_objectsGrabber/BIS_fnc_objectsMapper functions but I'm running into one particular snag that I can't figure out. The bar gate object, "Land_BarGate_F", isn't spawning in the correct position when spawned at any azimuth other than due north. Here's a picture of it spawning at 0 degrees: and here's a picture of it spawning at a different angle: As you can see, at a different angle it spawns out of place. Here are the functions I'm using to spawn compositions (apologies in advance for the code dump): Example config entry: objects[] = { {"Land_BarGate_F",{3.42554,0.0320976,0.00323486},0.402328}, {"Land_CncBarrier_F",{3.56418,-1.92152,0},-90.1721}, {"Land_CncBarrier_F",{3.54114,1.99699,9.53674e-006},-90.1721}, {"Land_CncBarrier_F",{-3.8572,-1.62853,2.86102e-005},-90.1721}, {"Land_CncBarrier_F",{-3.87824,1.72854,2.86102e-005},-90.1721}, {"RoadCone_L_F",{3.56628,-3.4401,0.00211143},0.065033}, {"RoadCone_L_F",{3.54395,3.52312,0.00223351},0.0621948}, {"RoadCone_L_F",{-3.86675,-3.20776,0.00213242},0.0647278}, {"Land_PortableLight_double_F",{-4.82907,1.52948,5.91278e-005},-20.4304}, {"RoadCone_L_F",{-3.88475,3.22092,0.00215912},0.0650024}, {"Land_PortableLight_double_F",{4.96732,-4.48994,0},-195.793}, {"I_MRAP_03_hmg_F",{-6.80197,-4.82961,0.0112801},16.556} }; Spawn function: _anchor = _this select 0; _path = _this select 1; _location = markerPos _anchor; _dir = markerDir _anchor; _objects = getArray (_path >> "objects"); _units = getArray (_path >> "units"); { _type = _x select 0; _v = _x select 1; _azi = _x select 2; _v1 = [_v,_dir] call CH_fnc_rotateVector; _pos = [_location,_v1] call CH_fnc_vectorToPos; _object = createVehicle [_type,_pos,[],0,"CAN_COLLIDE"]; _object setDir (_azi + _dir); } forEach _objects; CH_fnc_rotateVector: _vector = _this select 0; _theta = -(_this select 1); _x1 = _vector select 0; _y1 = _vector select 1; _x2 = (_x1 * (cos _theta)) - (_y1 * (sin _theta)); _y2 = (_x1 * (sin _theta)) + (_y1 * (cos _theta)); _newVector = [_x2,_y2,_vector select 2]; _newVector CH_fnc_vectorToPos: _anchor = _this select 0; _vector = _this select 1; _x1 = _anchor select 0; _y1 = _anchor select 1; _dx = _vector select 0; _dy = _vector select 1; _x2 = _x1 + _dx; _y2 = _y1 + _dy; _newPos = [_x2,_y2]; _newPos Part of me thinks that it's an issue with the engine's interpreted "center location" of the gate itself, but I'm not prepared to give up so easily. Does anybody have any thoughts on how to solve this?
  12. I'm trying to use BIS_fnc_objectsGrabber/BIS_fnc_objectsMapper to spawn dynamic compositions, but the objectsGrabber output doesn't include certain objects like H-barriers, sandbag walls, etc. Anybody have a similar problem and/or know how to get around it?
  13. doubleblind

    setUnconscious issues in vehicles

    For my revive system, I set it up to have units "shot out" of the vehicle when they go unconscious using the moveOut command before setting them unconscious
  14. Hey everyone, I'm working on a set of functions to spawn a predefined composition of objects to create and man a checkpoint on a road. Several of these compositions include a static weapon or armed vehicle, but I can't get the gunner to actually be on the weapon. Compositions are defined in a config class, a relevant one is below: class hmg_pair { units[] = {"I_Soldier_F","I_Support_MG_F"}; objects[] = { {"I_HMG_01_F",288.011,4.74926,0}, {"I_Quadbike_01_F",245.906,2.31535,10}, {"RoadBarrier_F",38.6281,2.48932,0}, {"RoadBarrier_F",314.969,2.54146,0}, {"Sign_Arrow_Direction_F",119.396,1.6997,0} }; }; A function pulls data from the config entries and spawns the composition. The function is below: _location = _this select 0; _type = _this select 1; _size = _this select 2; _class = ("true" configClasses (missionConfigFile >> "compositions" >> _type >> _size)) call BIS_fnc_selectRandom; _units = getArray (_class >> "units"); _objects = getArray (_class >> "objects"); _group = createGroup independent; _center = [(markerPos _location) select 0,(markerPos _location) select 1]; _angle = (markerDir _location) + 180; _composition = []; { _type = _x select 0; _theta = (_x select 1) + _angle; _rad = _x select 2; _dir = (_x select 3) + _angle; _pos = [(_center select 0) + (_rad*(sin _theta)),(_center select 1) + (_rad*(cos _theta)),0]; _veh = createVehicle [_type,_pos,[],0,"CAN_COLLIDE"]; _veh setDir _dir; _veh setVectorUp (surfaceNormal (position _veh)); _veh setPos [(position _veh) select 0,(position _veh) select 1,0]; if ((_veh isKindOf "car") || (_veh isKindOf "armored")) then { player action ["lightOn",_veh]; _veh setVehicleLock "LOCKED"; }; if (_type != "sign_arrow_direction_f") then { _composition = _composition + [_veh]; }; // Spawning units if (_type == "sign_arrow_direction_f") then { deleteVehicle _veh; _unitType = _units select 0; _units = _units - [_unitType]; _newUnit = _group createUnit [_unitType,_pos,[],0,"NONE"]; _newUnit setDir _dir; [_newUnit,["STAND_IA"] call BIS_fnc_selectRandom,"ASIS"] call BIS_fnc_ambientAnimCombat; _newUnit unassignItem "NVGoggles_indep"; _newUnit removeItem "NVGoggles_indep"; }; } forEach _objects; // Gunner assignment is here if (count _units != 0) then { _newUnit = _group createUnit [_units select 0,_group,[],0,"NONE"]; _newUnit assignAsGunner ((nearestObjects [position _newUnit,["car","armored","static","staticWeapon"],50]) select 0); _newUnit moveInGunner ((nearestObjects [position _newUnit,["car","armored","static","staticWeapon"],50]) select 0); }; [_composition,_group,_location] spawn CH_fnc_deleteComposition; My static weapon is spawning correctly, but the gunner is spawning near the other unit and immediately moves into formation. What I want to happen is the gunner to spawn already on the static MG. Anybody got any ideas? I suppose I could use an if/then to catch any turrets or vehicles and pass them to the gunner assignment block, but I think there's got to be a more elegant solution out there. Thanks in advance!
  15. Changing the gunner block to: if (count _units != 0) then { _newUnit = _group createUnit [_units select 0,_group,[],0,"NONE"]; _newUnit assignAsGunner ((nearestObjects [position _newUnit,["car","armored","static","staticWeapon"],50]) select 0); [_newUnit] orderGetIn true; }; did not work, same behavior.
  16. doubleblind

    GUI editor Spawn menu

    As @soolie said, it would help to have your full dialog code and any scripts or functions you're using for the back end. A clear, full description of exactly what you want this dialog to accomplish would be helpful as well.
  17. doubleblind

    GUI editor Spawn menu

    In your .hpp file that contains the dialog, add an action line to the config class for the buttons as necessary. I've added one to the last line of this example class: class Your_Button: RscButton { idc = 1; text = "Teleport"; //--- ToDo: Localize; x = 0.432989 * safezoneW + safezoneX; //-----The x, y, w, h, and size will be different for your button y = 0.566024 * safezoneH + safezoneY; w = 0.0618565 * safezoneW; h = 0.0550202 * safezoneH; sizeEx = 1 * GUI_GRID_H; action = "_yourUnit setPos (markerPos 'destinationMarker')"; }; Replace _yourUnit with the player or players or whatever and 'destinationMarker' with the name of whatever marker you want to teleport to. If you want to use a more complicated but more robust system, you can write a function and call it in the same line. Basically, the action line means that anything between the quotation marks is done when the button is clicked.
  18. Hey all, I'm running into a problem exporting a mission from the Eden Editor to the Steam Workshop - everything works in the editor, but when running the mission downloaded from the Steam Workshop one of my dialogs (purchasing a vehicle) isn't working and I have absolutely no idea why. The idea is that the player selects an entry from a ComboBox and an event handler in the control executes a function. The relevant control class: class Vehicles_Ctrl: RscCombo { idc = 11; x = 0.432989 * safezoneW + safezoneX; y = 0.400964 * safezoneH + safezoneY; w = 0.134022 * safezoneW; h = 0.0220081 * safezoneH; sizeEx = 0.99 * GUI_GRID_H; onLBSelChanged = "_this call CH_fnc_SelectVehicle"; }; and the CH_fnc_SelectVehicle function: _PV = findDisplay 2; _vehicleCtrl = _PV displayCtrl 11; _vehicle = _vehicleCtrl lbData (lbCurSel _vehicleCtrl); (_PV displayCtrl 21) ctrlSetText (format ["Capacity: %1 Men",getNumber (missionConfigFile >> "Vehicles" >> _vehicle >> "capacity")]); (_PV displayCtrl 22) ctrlSetText (format ["Top Speed: %1 km/h",getNumber (missionConfigFile >> "Vehicles" >> _vehicle >> "topSpeed")]); (_PV displayCtrl 23) ctrlSetText (format ["Armament: %1",getText (missionConfigFile >> "Vehicles" >> _vehicle >> "armament")]); (_PV displayCtrl 32) ctrlSetText (format ["Cost: $%1",getNumber (missionConfigFile >> "Vehicles" >> _vehicle >> "price")]); uiNamespace setVariable ["selectedVehicle",_vehicle]; Is there something wrong with the code, or is this just a Steam Workshop oddity?
  19. Does anyone know how to increase the size of the display that comes up when BIS_fnc_liveFeed is called? The little postage stamp that appears by default is pretty neat but not really a big help for gameplay in some cases.
  20. It's a case of the former, and I don't think it's a view distance thing... I have my view distance at 3200 and the drone is 500m high at a 750m loiter radius. Is there some limiter on the PIP to save frames or something that can be reduced since it's just pointing at the ground?
  21. Thank you! That function definitely did its job, but I also have another question: is there any way to make the object view distance in PIP greater? I'm making a custom UAV recon support and it's kind of annoying that the terrain is there but you can't see units on the ground.
  22. Looking through the Strategic Map documentation here there's clearly a way to open the Strategic Map in its own display using the 0 index parameter. I would like to know if there's a way to open it in a specific control within that display, i.e. have it in part of the display with room for other controls simultaneously. Anybody know if this is supported?
  23. doubleblind

    Detect vehicle explosions

    There are a couple ways you could do it. I would personally add an event handler, like so: _vehicle addEventHandler ["Killed",{hint "The vehicle has been destroyed"}] This won't necessarily detect the explosion, but it will detect the vehicle's health going to 0 which, AFAIK, leads to an explosion for all vehicles. Just replace the code inside the {} brackets with whatever you want to happen. Assuming that the vehicle will explode when its health goes to 0, this will effectively do the same thing. If you want to be sure that the vehicle will blow when it hits 0 health, put your crosshair over it, open the pause menu, and type: cursorTarget setDamage 1; into the debug console. Then hit 'Local Exec' and watch the fireworks.
  24. Hi everyone, I'm installing ArmA III Tools on my new computer and I'm having trouble getting the A3 folder on the P:/ drive to fill. I've restarted my computer after installing the P:/ drive, tried all kinds of permutations of the install/mount/restart process, but all that appears in my A3 folder is Data_f with halfa.paa in it. Anybody know what to do?
×