Jump to content

beako

Member
  • Content Count

    54
  • 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. 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.
  2. 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?
  3. 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?
  4. 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]};"];
  5. 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.
  6. 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?
  7. 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.
  8. 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.
  9. 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"; };
  10. 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... }; ...
  11. 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.
  12. HI All, In the BIS_fnc_moduleSector under the parameter setting #6 it describes the following: 6: _onOwnerChange (String) - Code as STRING that runs when a sector is captured, code is passed [ _sector, _owner, _old Owner ] in _this, code is also run at sector initialisation _owner will be default owner and _oldOwner will be sideUnknown I'm tried to insert the following code that lowers the _oldOwner flags then raises the _owner flags but the module seems to override the setFlagTexture function, and I cannot raise the flag once it hits the bottom. //Code as STRING that is run when sector changes ownership [ "_onOwnerChange", " private _flagsArray = (_this select 0) getVariable 'flags'; private ['_flagSideTexture']; _flagSideTexture = ''; switch (_this select 2) do { case EAST : {_flagSideTexture = '\A3\Data_F\Flags\Flag_CSAT_CO.paa'}; case WEST : {_flagSideTexture = '\A3\Data_F\Flags\Flag_NATO_CO.paa'}; default {_flagSideTexture = '\A3\Data_F\Flags\Flag_white_CO.paa'}; }; {_x setFlagTexture _flagSideTexture} forEach _flagsArray; {[_x, flagAnimationPhase _x - 1, 0.1] call BIS_fnc_animateFlag} forEach _flagsArray; switch (_this select 1) do { case EAST : {_flagSideTexture = '\A3\Data_F\Flags\Flag_CSAT_CO.paa'}; case WEST : {_flagSideTexture = '\A3\Data_F\Flags\Flag_NATO_CO.paa'}; default {_flagSideTexture = '\A3\Data_F\Flags\Flag_white_CO.paa'}; }; {_x setFlagTexture _flagSideTexture} forEach _flagsArray; {[_x, flagAnimationPhase _x + 1, 0.1] call BIS_fnc_animateFlag} forEach _flagsArray; ", [ "" ] ], Any ideas on how I can do this? Ideally I would like the old owner's flag to lower completely, then replace the texture with the new owner and raise to the top, to match the BIS_fnc_moduleSector vertical bar animation.
  13. What is the best way to create and eventhandler for currentThrowable items? I want an event handler to track every time I throw a throwable, so when my player's inventory of "HandGrenade"or "SmokeShellGreen" is depleted I can refill it. I have tried to use an "explosion" EH with the following but does not work as _throwableArray is an array of strings, and I can't figure out how to create an array of throwables on the player...Also I don't think this would work for a "SmokeShell" _throwableArray = []; { if (_x == _throwable) then {_throwableArray pushBack _x} } forEach (magazines player); { _x addEventHandler ["Explosion", { params ["_vehicle", "_damage"]; if (damage _vehicle > 0.1) then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }]; } forEach _throwableArray; I have tried to use "AnimDone" EH, but could not even find the common animation for throwing... player addEventHandler ["AnimDone", { params ["_unit", "_anim"]; if (_anim == "AmovPercMrunSlowWpstDf_AmovPercMstpSrasWpstDnon_gthThrow") then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }];
  14. What is the best way to create and eventhandler for currentThrowable items? I want an event handler to track every time I throw a throwable, so when my player's inventory of "HandGrenade"or "SmokeShellGreen" is depleted I can refill it. I have tried to use an "explosion" EH with the following but does not work as _throwableArray is an array of strings, and I can't figure out how to create an array of throwables on the player...Also I don't think this would work for a "SmokeShell" _throwableArray = []; { if (_x == _throwable) then {_throwableArray pushBack _x} } forEach (magazines player); { _x addEventHandler ["Explosion", { params ["_vehicle", "_damage"]; if (damage _vehicle > 0.1) then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }]; } forEach _throwableArray; I have tried to use "AnimDone" EH, but could not even find the common animation for throwing... player addEventHandler ["AnimDone", { params ["_unit", "_anim"]; if (_anim == "AmovPercMrunSlowWpstDf_AmovPercMstpSrasWpstDnon_gthThrow") then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }];
  15. HI All, In my description.ext below I have 3 different displayNames, but want to identify the "displayName" the player selected from the respawn menu? description.ext respawnTemplates[] = {"MenuPosition","MenuInventory"}; class CfgRespawnInventory { class WEST1 { displayName = "Capt 'Deuce' Williams"; // Name visible in the menu ... }; class WEST2 { displayName = "Sgt Thomas 'Mac' Macintyre"; // Name visible in the menu ... }; class WEST3 { displayName = "Lt John Davis Tyler"; // Name visible in the menu ... }; }; How could I use [missionconfigfile >> "CfgRespawnInventory" >> "WEST2"] call BIS_fnc_displayName to identify the character the player selected from the respawn menu?
×