Jump to content

beako

Member
  • Content Count

    58
  • Joined

  • Last visited

  • Medals

Community Reputation

12 Good

About beako

  • Rank
    Lance Corporal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi All, Any suggestions on how to conceal knowledge about an enemy mine after is has been revealed after a set amount of time. I was going to just delete it and recreate it in the same spot, after the player has left the area, but was wondering it there is a specific function or better work around.
  2. Hi All, How to I obtain the map dimensions of a particular map in Arma 3. worldSize returns the area bur for rectangular maps like Livonia. I want to create an area that is 500m from then end of the map height and width. hint format ["drawRectangle \n worldName: %1 \n worldSize: %2",worldName, worldSize] ; (findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw",{ (_this select 0) drawRectangle [ [worldSize / 2,worldSize / 2,0], (worldSize / 2) - 500, (worldSize / 2) - 500, 0, [0,0,1,1], "#(rgb,8,8,3)color(0,1,1,0.25)" ]; }];
  3. HI ALl, I have a script for a UAV (Sentinel) that targets enemy units (tanks and soldiers)... The problem is, as part of the script their is a JTAC soldier that uses laserTarget to target the same object as the UAV. The UAV is armed with PylonMissile_1Rnd_BombCluster_01_F and PylonMissile_Missile_AGM_02_x2, but I only want the UAV to fire the AT munition (PylonMissile_Missile_AGM_02_x2) on the tank, but because the laserTarget is on the tank from the JTAC, it fires the bombcluster munition instead. How should I script for the UAV to use weapon_AGM_65Launcher on Tanks only? I've tried the following with [0] and [-1] as a turretPath for selectWeaponTurret, but has no effect...I even tried using selectWeapon with no luck. I want to avoid forceFire, since it misses the target. // laserTarget from JTAC soldier _laserTarget = laserTarget _JTACUnit; // AT Ammo Count _getPylMagArray = getPylonMagazines _airTransport; _ammoCountATArray = [0,0]; for "_i" from 1 to 2 do { if (((_getPylMagArray select (_i - 1)) find "PylonMissile_Missile_AGM_02_x2") > -1) then { _ammoCountATArray set [(_i - 1), (_airTransport ammoOnPylon ("pylon" + str _i))]; } else { _ammoCountATArray set [(_i - 1), 0]; }; }; _ammoCountAT = 0; {_ammoCountAT = _ammoCountAT + _x} forEach _ammoCountATArray; // do not user clusterbomb on tanks if !(isNull _laserTarget) then { if (_ammoCountAT > 0) then { _sentinelUAV selectWeaponTurret ["weapon_AGM_65Launcher", []]; //"BombCluster_01_F" _sentinelUAV selectWeapon "weapon_AGM_65Launcher"; }; };
  4. HI All, I'm trying to get the a laserTarget on a soldier with a player or AI user the Laser Designator to target units. The laserTarget appears on all units, including soldiers in static weapons but passes through all other soldiers. #1) Any advise on creating a laserTarget attachedTo a soldier and deleting working around removing the one that passes through the soldier? Here is the script I'm using for creating a laser line and laserTarget. params ["_startObject"]; if (isNull _startObject) exitwith {}; ["laser", "onEachFrame", { params ["_startObject"]; //if (currentVisionMode _startObject == 1) exitwith {}; _designatedObj = laserTarget _startObject; if !(isNull _designatedObj) then { _lasercolour = [1,0,0,1.5-sunOrmoon]; // first 3 numbers are RGB _range = 2500; // laser range _maxsize = 5; _start = ASLToAGL eyePos _startObject; _end = getPos _designatedObj; _int = lineIntersectsSurfaces [atltoasl _start, atltoasl _end, _startObject, _designatedObj, true, 1, "VIEW", "GEOM"]; _size = _maxsize; //hintSilent format ["_int: %1", _int]; if !(_int isEqualTo []) then { _end = (_int select 0) select 0; _end = asltoagl _end; _length = _start vectorDistance _end; systemchat format ["_length: %1 _int: %2 ", round _length, typeOf ((_int select 0) select 2)]; if (_length >= _range) then { _size = 0; } else { _size = _maxsize; }; if (_length < 1) then {_size = 0}; } else { _length = _start vectorDistance _end; systemchat format ["_length: %1", round _length]; }; drawLine3D [_start, _end, _lasercolour]; // comment this out to remove the line drawIcon3D ["\a3\data_f\car_light_flare2.paa", _lasercolour, _end, _size, _size, random 360, "", 0, 0.05, "PuristaMedium"]; },[_startObject]] call BIS_fnc_addStackedEventHandler; #2) ALSO, Is there a way to make the actual laserTarget generated from the laser designator visible in daylight. I would like to use it instead if I can as it scales in size with distance appropriately? I've tried playing with setLightIntensity, setLightBrightness, setLightColor and setLightDayLight but had not luck. thanks
  5. I thought so also at first so I used BIS_fnc_spawnVehicle, then tried to add a unit in the spawned vehicle with: _vehArray = [[0,0,100], getDir player, _x, _AIside] call BIS_fnc_spawnVehicle; _veh = _vehArray select 0; _vehCrew = _vehArray select 1; _grp = _vehArray select 2; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; But this too does not create the unit in the "CARGO" of the vehicle.
  6. HI All, Based on createUnit using syntax type createUnit [position, group, init, skill, rank] it states ""CARGO" - The unit will be created in cargo of the group's vehicle, regardless of the passed position. If group has no vehicle or there is no cargo space available, the unit will be placed according to "NONE"." Yet, I cannot create units inside a vehicle unless I use moveIn as below. _posLand = screenToWorld [0.5,0.5]; _veh = "O_T_LSV_02_armed_F" createVehicle [0,0,100]; _grp = createGroup EAST; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; Is there a way to create units directly inside a vehicle with designating a position or moving them in?
  7. HI All, I need a better understanding of the consequences of using global variables in my MP game. I read the following Variables and KK's blog – Variables - ArmA Scripting Tutorials: Variables all three part by Killzonekid but still unsure how global variables will impact the performance of my MP game and the many scripts I have. For example, is it better to use the following in every function that requires the enemy's side _AIside = WEST; if (playerSide isEqualTo WEST) then {_AIside = EAST}; or simply create the following in initServer.sqf if (playerSide == WEST) then {AIside = EAST} else {AIside = WEST}; and use AIside in each function. What is better for overall performance?
  8. Hi ALL, Is there a way yet to disable Optics when pressing the RMB? I'm using the following to assign a value to the RMB that triggers a function, but unfortunately it also causes the player to use their optics. I would like to temporarily disable optics when triggering this function and reenable it after. _mouseM = (findDisplay 46) displayAddEventHandler ["MouseButtonDown", "if (_this select 1 == 1) then {missionnamespace setvariable ['place',true]};"];
  9. HI All, I've read the section in Arma 3 Dynamic Simulation but it is still not clear to me how to display the Ingame diagnostics, particularly the map with DynSimEntities. It states, "As the part of the Dynamic Simulation system 3 new diagnostic modes were added to the debug console. All 3 diagnostic modes overlay map with an extra information. The modes can all be active at the same time, if needed." yet where do I activate this in the debug console and how do I see the diagnostic map? Instead I get an error when I enter "DynSimEntities" diag_enable true; in the debug console saying "DynSimEntities" #diag_enable true; Error missing ; Is this because I am running it in an MP game? Has anyone used this before? If so, please provide more detailed steps to see the map grid with DynSimEntities.
  10. Thanks warlord554, I could sill not find the .p3d file for a soldier holding his secondary weapon over his shoulder. But I thought I could somehow cheat using BIS_fnc_createSimpleObject even though Arma 3 Simple Objects states "Simple Object Capability - Not all objects work well as simple objects - some objects require adjustment data (that need to be prepared properly by the content creator), some do not work at all (like units, game logics, weapon holders etc.)." So far I have only managed to create a headless body of a man with arms out to the side. My goal is to find a way to create an soldier holding his secondary weapon over his shoulder, setObjectTexture to it and rotate and translated it to wherever screenToWorld is pointed to, then spawn it. So far, I can do this for vehicles using BIS_fnc_createSimpleObject, as it is less demanding on framerate. if (_vehType isKindOf "Man") then { _text = getText (configfile >> "CfgVehicles" >> _vehType >> "model"); _textArray = toArray _text; _textArray deleteAt 0; _text = toString _textArray; _veh = [["B_Soldier_base_F", _text, 0, 0, ["AmovPercMstpSrasWrflDnon_AmovPercMstpSrasWlnrDnon_end",1]], _pos, 0, true, false] call BIS_fnc_createSimpleObject; } Any ideas?
  11. Where could I locate the .p3d models for various animations of soldiers? I would like to create a model of an AT soldier aiming his secondary weapon, rotate it and position it with the screenToWorld function before spawning it at that location.
  12. HI All, I'm trying to update information within the custom menu and sub-menu so I don't have to keep exiting the menu for it to rerun the function. I there are certain conditions that may get updated during game play, like _ownsRadioTower, my_Money and player getVariable ["REINFORCEMENTS", FALSE] that may change while the player in the custom menu, and I would like it to update the status from being disabled (in grey )to enabled. MY_MENU_inCommunication = [ ["DESTRUCTION MENU",true], ["MOTOR POOL", [2], "#USER:MENU_MOTOR_POOL", -5, [["expression", " player sideChat ""Order Vehicles"" "]], "1", "1"], ["ARMORY", [3], "#USER:MY_SUBMENU2_inCommunication", -5, [["expression", " player sideChat ""Order Emplacements"" "]], "1", "1"], ["RADIO TOWER", [4], "#USER:MY_SUBMENU3_inCommunication", -5, [["expression", " player sideChat ""CALL IN SUPPORT/INTEL"" "]],"1", missionnamespace getvariable ["mainActive3","0"] ], ["REINFORCEMENTS", [5], "#USER:MY_SUBMENU4_inCommunication", -5, [["expression", " player sideChat ""CALL IN REINFORCEMENTS"" "]], "1", missionnamespace getvariable ["mainActive4","0"] ] ]; if (_ownsARadioTower) then { mainActive3 = 1} else {mainActive3 = 0}; //&& sector1 getVariable "owner" == WEST if (my_Money >= 25 and player getVariable ["REINFORCEMENTS",FALSE]) then { mainActive4 = 1} else {mainActive4 = 0}; _array5 = MY_MENU_inCommunication select 3;// 4th line menu item _array5 set[6, str mainActive3];// change grey out status _array5 = MY_MENU_inCommunication select 4;// 4th line menu item _array5 set[6, str mainActive4];// change grey out status showCommandingMenu "#USER:MY_MENU_inCommunication"; Thanks for any advice in advance.
  13. HI ALL, I am simply trying to replace the current secondary weapon with a different type of launcher, but have it added already preloaded. Instead I have to wait until the unit reloads the weapon then I have to restock his backpack with the magazine he just used. Is there a simpler way to add a preloaded weapon? _man2 = objNull; {if (typeOf _x == "B_T_Soldier_LAT_F") then {_man2 = _x}} forEach units player; _lancherMagArray = []; _BP = ""; _BPItems = []; _backPackCamo = 'B_Kitbag_sgg'; // for units with secondaryWeapons _lancherMagArray = getArray (configfile >> "CfgWeapons" >> secondaryWeapon _man2 >> "magazines"); if !(_lancherMagArray isEqualTo []) then { // for B_T_Soldier_LAT_F replace NLAW with launch_RPG32_ghex_F if (typeOf _man2 == "B_T_Soldier_LAT_F") then { [_man2, "launch_RPG32_ghex_F", 2, "RPG32_F"] call BIS_fnc_addWeapon; _lancherMagArray = ["RPG32_F","RPG32_HE_F"]; }; // replaceBP with "B_Kitbag_cbr" removeBackpack _man2; _man2 addBackpack _backPackCamo; // B_Kitbag_sgg B_Kitbag_mcamo B_Kitbag_rgr B_Kitbag_cbr // fill backpack { if (_man2 canAddItemToBackpack _x) then { waitUntil { _man2 addItemToBackpack _x; !(_man2 canAddItemToBackpack _x) }; }; } forEach _lancherMagArray; _BP = backpack _man2; _BPItems = backpackItems _man2; }; // cheat to fill backpack after reloading launcher if (typeOf _man2 == "B_T_Soldier_LAT_F") then { waitUntil { ((_man2 ammo "launch_RPG32_ghex_F") == 1) }; _man2 addItemToBackpack "RPG32_F"; };
  14. HI all, I'm trying to set the brightness of an object based on the ambient brightness of the environment. But so far the only way I found how to do this is based on the time of day. Is there a way to determine the ambient brightness in the based on the current time of day? _intensity = 0; _timeOfDay = daytime; switch (TRUE) do { case ( (_timeOfDay >= 0) and (_timeOfDay < 2) ) : {_intensity = 0.5}; case ( (_timeOfDay >= 2) and (_timeOfDay < 3) ) : {_intensity = 0.75}; case ( (_timeOfDay >= 3) and (_timeOfDay < 4) ) : {_intensity = 1.0}; etc... }; ...
  15. Thanks everyone. Larrow this does exactly what I want, I work with this to incorporate into my game. Thanks again, this would have taken me weeks.
×