Jump to content

RCA3

Member
  • Content Count

    509
  • Joined

  • Last visited

  • Medals

Everything posted by RCA3

  1. Go to your folder C:\Users\<username>\Documents\Arma 3 - Other Profiles\<username> and open your <username>.Arma3Profile Esc key shortcut for game menu should be this: KeyIngamePause[]={1};
  2. This is not a thing. Wrong syntax. https://community.bistudio.com/wiki/setVariable
  3. I'm gonna give it a try first. @awdsawds, Go to OPTIONS-GAME-GENERAL -> AIMING DEADZONE Set it all the way to the Left. See if that's what you're looking for.
  4. Better skip that command and set their behaviour to SAFE on the editor or apply to the group. this setBehaviourStrong "SAFE";
  5. Good point! So, if you don't mind not increasing rating to your players when killing bad guys (or not decreasing rating when killing good guys) , the solution would be to add this into your initPlayerLocal.sqf params ["_player", "_didJIP"]; _player addEventHandler ["HandleRating", { params ["_unit", "_rating"]; 0 }];
  6. Your code works, i'll repost here because you have lots of red dots on copy/paste (forums' bug). addMissionEventHandler ["EntityKilled", { params ["_killedUnit","_killer","_triggerMan"]; if (side group _killedUnit isEqualTo civilian && _killedUnit isKindOf "CAManBase" && side _triggerMan isEqualTo west) then { if (isNil {missionNameSpace getVariable "MyCivKillCounter"}) then { missionNameSpace setVariable ["MyCivKillCounter",0,true]; }; missionNameSpace setVariable ["MyCivKillCounter", (missionNameSpace getVariable ["MyCivKillCounter",0]) + 1, true]; systemChat str (missionNameSpace getVariable ["MyCivKillCounter",0]); }; }]; I added this line which you can delete, it's just for you to debug: systemChat str (missionNameSpace getVariable ["MyCivKillCounter",0]); This is also what you want to use on your triggers: missionNameSpace getVariable ["MyCivKillCounter",0] > <your number here>
  7. RCA3

    Side chat question

    Upcoming EH's on 2.10 https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Group_Event_Handlers Other than that, it's a lot of scripting if you want enemy type (infantry, vehicle, etc), size, distance, direction... (or maybe i'm just lazy). To avoid triggers maybe start with a loop through allGroups running from initServer.sqf.
  8. If you have CBA_A3 you can run this on initServer.sqf: ["CAManBase", "init", { (_this # 0) addMPEventHandler ["MPHit",{call Eventhandler_fnc_MPHit}]; }, true, [], true] call CBA_fnc_addClassEventHandler;
  9. No problem, i'm glad it worked. I wasted a lot of time back in the day to find that out too. It sucks the AI needs so many commands to abandon the vehicle, but that's that.
  10. This will get you started (on a trigger), You'll need an additional condition (e.g distance to LZ: (vehicle player) distance (getMarkerPos "pat1") < 100) so it won't activate on takeoff. //Condition: isTouchingGround (vehicle player) //On activation: commandGetOut units grp1; { unassignVehicle _x; [_x] orderGetIn false; }forEach units grp1; grp1 leaveVehicle (vehicle player); [grp1, "pat1"] call CBA_fnc_taskSearchArea; hint "working";
  11. I have no idea, but ask here :
  12. Here's what I do to my AI on disembark (no code because it's old): Clear all their waypoints. deleteWaypoint (see Mr. H example) Spawn unassignVehicle followed by orderGetIn. Spawn waitUntil everybody is on foot or dead (objectParent) and then leaveVehicle for each assignedVehicle of the group (each unit might have different vehicle). And finally one crazy thing that happened on Arma 2 and I don't know if it still happens, but AI would panic if group got too small AND lost their vehicles, so: (leader _group) setSkill "courage" 0.8 (leader _group) allowFleeing 0
  13. RCA3

    Static Terminals

    I realized code above doesn't allow you to add waypoints to the UAV (only allows direct control). In order to add waypoints we need to open the actual terminal instead of connecting directly to the UAV. The code below works but there's a caveat: ESC is not detected on keyDown (at least inside the terminal display/map). This makes the script NOT remove the terminal from player upon exit on ESC key (only on M key exit). I'm posting this to try and fix later. If someone has a workaround/fix please come through. EDIT: I think I got it. After some sleep in order to wait for the correct Display I think I covered all bases. Maybe this is done somewhere else already 😅but: In collaboration with @Larrow Static Terminals 👇 UPDATE: - removed sleep (wasn't needed but spawn was) - fixed duplicate of EH's this addAction [ "Open UAV Terminal", { params ["_target", "_caller", "_actionId", "_arguments"]; _caller linkItem "B_UavTerminal"; waitUntil{ "B_UavTerminal" in assignedItems _caller}; _caller action ["UAVTerminalOpen", _caller]; waitUntil {!isNull findDisplay 160}; if !(isNil "uav_PVC_EH") then{ removeMissionEventHandler ["PlayerViewChanged", uav_PVC_EH]; }; uav_PVC_EH = addMissionEventHandler ["PlayerViewChanged", { params ["_oldUnit", "_newUnit", "_vehicleIn", "_oldCameraOn", "_newCameraOn", "_uav"]; [] spawn{ findDisplay 160 displayAddEventHandler ["KeyDown", " params ['_ctrl', '_dikCode', '_shift', '_ctrlKey', '_alt']; if (_dikCode in (actionKeys 'hideMap') || _dikCode in (actionKeys 'ingamePause')) then{ player connectTerminalToUAV objNull; player unlinkItem 'B_UavTerminal'; removeMissionEventHandler ['PlayerViewChanged', uav_PVC_EH]; }; "]; }; }]; findDisplay 160 displayAddEventHandler ["KeyDown", " params ['_ctrl', '_dikCode', '_shift', '_ctrlKey', '_alt']; if (_dikCode in (actionKeys 'hideMap') || _dikCode in (actionKeys 'ingamePause')) then{ player connectTerminalToUAV objNull; player unlinkItem 'B_UavTerminal'; if !(isNil 'uav_PVC_EH') then{ removeMissionEventHandler ['PlayerViewChanged', uav_PVC_EH]; }; }; "]; }, nil, 1.5, true, true, "", "isPlayer _this", 3, false, "", "" ];
  14. RCA3

    Static Terminals

    Hi, and welcome to the forums! If I understood you correctly you want a static UAV terminal without the use of an (gear slot) item terminal. If so, you need a terminal (object, e.g. a laptop) and you need an UAV named uav1. Paste this into the init field of the terminal. All the hard work was done by @Larrow here, I just pasted it inside the addAction. this addAction [ "Open UAV Terminal", { params ["_target", "_caller", "_actionId", "_arguments"]; _caller linkItem "B_UavTerminal"; waitUntil{ "B_UavTerminal" in assignedItems _caller}; diag_log "Terminal received"; _caller connectTerminalToUAV uav1; waitUntil{ isUAVConnected uav1}; diag_log "Connected"; _caller action ["SwitchToUAVGunner", getConnectedUAV _caller]; waitUntil{ isUAVConnected uav1 && ( cameraOn isEqualTo uav1) }; diag_log "In gunner: adding ev"; addMissionEventHandler [ "PlayerViewChanged", { params[ "_oldUnit", "_newUnit", "_vehicle", "_oldCamera", "_newCamera", "_uav" ]; diag_log "PVC_fired"; if ( _oldCamera isEqualTo uav1 && { ( _newCamera isEqualTo player ) } ) then { diag_log "disconnecting terminal"; player connectTerminalToUAV objNull; diag_log "removing terminal"; player unlinkItem "B_UavTerminal"; diag_log "player disconnected"; removeMissionEventHandler[ "PlayerViewChanged", _thisEventHandler ]; }; }]; }, nil, 1.5, true, true, "", "isPlayer _this", 3, false, "", "" ];
  15. Hey, thanks! It was nothing, really. Congrats on the release! It looks cool
  16. Thanks 😍 Now let's say we only want the action on our given unit: createSample = { params ["_sample", "_unit"]; [ _sample, // Name of the object "Collect a sample", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 5", "_caller distance _target < 5", {}, {}, { params ["_target", "_caller", "_actionId", "_arguments"]; _arguments params ["_sample", "_unit"]; //code }, {}, [_sample, _unit], 5, 0, false, false ] remoteExec ["BIS_fnc_holdActionAdd", _unit]; //execute only where _unit is local }; [objVar, playerVar] call createSample;
  17. Per your example you don't need _unit variable because you're using it for evaluating only the availability of the action which you can/have to replace with _this, _target and _caller (BIS_fnc_holdActionAdd example 2). If you need it though you could pass it (to a total of ten custom variables) as arguments to be evaluated on codeStart, codeProgress, codeCompleted and codeInterrupted. In the example below we are hinting our arguments on code completion. All arguments are available through _this # 3 or params ["_target", "_caller", "_actionId", "_arguments"];. createSample = { params ["_sample", "_unit"]; [ _sample, // Name of the object "Collect a sample", //title of the action "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 5", // The condition for the Action to be shown "_caller distance _target < 5", // The condition for the Action to progress {}, // The code executed when the action starts {}, // The code executed on every progress tick { params ["_target", "_caller", "_actionId", "_arguments"]; _arguments params ["_sample", "_unit"]; hint str [_sample,_unit]; }, // The Code which is executed on action completion {}, // The code which is executed when the player is interrrupted or stops interaction [_sample, _unit], // Arguments passed to the scripts as _this select 3 5, // The duration how long will it take for the action to be completed in seconds 0, // Priority false, // Remove the action once it has been completed false // show Unconsious state ] remoteExec ["BIS_fnc_holdActionAdd", [0,-2] select isDedicated, true]; }; // This is how the function will be called [objVar, playerVar] call createSample;
  18. I had to open 3den Enhanced but the respawn returns _this which refers to the unit (Variable Name given in editor) that died. The name remains the same throughout, no need to rename the unit or get the name in any special manner, it's always _this. So forget UnitClass.sqf and just type on the respawn code field: if (_this isEqualTo Assault1) then{ //code }; That's it! If your code is to execVM “Assault.sqf” you can run: //code _this execVM "Assault.sqf"; In Assault.sqf: params [_unit]; //code private _pweapon = primaryWeapon _unit; hint str _pweapon; PierreMGI's solutions are also valid if you don't want to use 3Den Enhanced respawn method. Thanks for chiming in @pierremgi and @dwringer!
  19. You're passing _this, you want _unit: if ( _class == "Assault1") then {null = [_unit] execVM "Assault.sqf"}; // supposed to run script but does not work. #HELP
  20. Depends where/how you run it. No, you name the unit's Variable Name on the Editor under Attributes: It would run "for" _unit if _unit is defined properly. If you're running from the unit's Init field e.g. (picture above) you could do: if (this isKindOf "Man") then { this execVM "assault.sqf"; }; See I used "Man" as a class. "Assault" is not a class. A class in this case (isKindOf) would be a type of vehicle. assault.sqf could look something like: params [_unit]; //code e.g. _unit doMove (getMarkerPos "Here"); If you want to run this from somewhere else (which you probably do) you could name your unit (Variable Name) and then you can call it from anywhere in the game: null = soldier1 execVM "assault.sqf"; //assault.sqf params [_unit]; //code e.g. if (_unit isKindOf "Man") then { _unit doMove (getMarkerPos "Here"); }else{ _unit doMove (getMarkerPos "There"); }; If you want you can also name your group's Variable Name on the Editor under Attributes. Then you could e.g. null = soldier1 execVM "assault.sqf"; //assault.sqf params [_unit]; //code e.g. if (group _unit isEqualtTo "Assault") then { _unit doMove (getMarkerPos "Assault Here"); }; if (group _unit isEqualtTo "Defense") then { _unit doMove (getMarkerPos "Defend Here"); };
  21. https://community.bistudio.com/wiki/Eden_Editor:_Object#Attributes https://community.bistudio.com/wiki/Eden_Editor:_Entity_Attributes#Attribute_Categories https://community.bistudio.com/wiki/isKindOf https://community.bistudio.com/wiki/if You can use this code on a Trigger or you can use it on init.sqf file inside your mission folder. This is your Scripting Glossary: https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands This is your Eden Editor basics: https://community.bistudio.com/wiki/Category:Eden_Editor This might give you an intro overview of things: https://community.bistudio.com/wiki/Initialization_Order You need to read a little bit. See other people's scripts is how I started. Feel free to ask further questions.
  22. Maybe: Event_Handlers#Killed and reveal - - EDIT: @johnnyboy, That didn't work but this was quite obvious after a while 😐 this addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; [_unit] joinSilent grpNull; }]; Also use this, for your case it seems necessary removeSwitchableUnit.
  23. RCA3

    Pascal RTGI/Reshade and ARMA3

    No, use the default profile. Then in game open Reshade menu (Home key as default I believe) and go to Settings Tab. In there you can point to your shaders directory, answering your b) question. Reshade installation comes with shaders already and no presets. You make presets on your Home Tab on the (+) sign. You don't need to download the shaders shown on the video. You install Reshade each time on each new game you want to reshade. That's why you install it on your game folder. It comes with a dxgi.dll which the game needs to recognize in order to initiate Reshade upon game start. There are presets out there you can use, specific for each game (very few for Arma). But you can start with a clean preset and just select one shader for example and just use that, that's automatically called a preset, you can add as many shaders as you want to that preset. This is all done in-game in the Reshade menu. You can use Presets from other games on Arma but generally they won't look like as they would on the game they were made for. Here's 2 examples: https://www.nexusmods.com/assassinscreedvalhalla/mods/9 https://www.nexusmods.com/assassinscreedvalhalla/mods/10 Here's some for Arma: https://sfx.thelazy.net/games/game/183/ Yes, it only uses ReShade.ini. This video is short and simple: From Reshade compatibility list: ArmA 3 / Direct3D 10+ / Good / Depth buffer flickering in FPS mode. Works fine in third person mode. So select Direct3D 10/11/12 on install.
  24. OK, sorry I couldn't help. I'd suggest dropping by Arma discord and ask on #scripting channel.
×