This code placed in the description.ext file will increase the amount of stamina a player has, this is very useful in a vanilla Arma 3 mission.
class CfgMovesFatigue { staminaDuration = 180; //total amount of stamina staminaCooldown = 30; //when you run out of stamina the sprinting is disabled for this duration staminaRestoration = 60; //time required for your current stamina pool (total stamina - inventory load) to restore aimPrecisionSpeedCoef = 0; //aimPrecision adjusting rate coefficient terrainDrainSprint = 0; //when terrain gradient disable sprint, this stamina value is added to every animation state terrainDrainRun = 0; //when terrain gradient enable force walk, this stamina value is added to every animation state terrainSpeedCoef = 0.6; //when terrain gradient disable sprint, animation speed is multiplied by this value }; class CfgWeaponHandling { class SwayDistortion { rate = 6; decay = 3; maximum = 5; gunnerCoef = 1.2; }; class SightAlignment { rate = 0.1; decay = 1.8; maximum = 0.7; gunnerCoef = 0.2; }; class Stabilization { characterPoints[] = {"lElbow","rElbow"}; weaponPoints[] = {"Usti hlavne","Konec hlavne"}; upperBodyRadius = 0.12; weaponRadius = 0.4; restingCoef = 0.4; restingProneCoef = 0.08; restingRecoil = 0.5; restingRecoilPersistent = 0.5; deployedCoef = 0.1; deployedProneCoef = 0.02; deployedRecoil = 0.5; deployedRecoilPersistent = 0; deployTime = 0.2; undeployTime = 0.2; deployBipodTime = 0.4; undeployBipodTime = 0.3; }; class Recoil { kickVisual = 0.4; impulseCoef = 1; prone = 1.15; // 1.25 }; class Camera { aimTransitionSpeed = 5; }; }; |
That is how to mod stamina without a mod. This really does work, and is a great way to improve a mission, the creator can have stamina enabled, but have sensible amounts of performance from a soldier.
This code shows how to define a task to destroy an object.
[west,["task1"],["Destroy enemy EMP weapon.","EMP device.","aoMarker"], objNull,1,3,true] call BIS_fnc_taskCreate; ["task1",_RoughPos2] call BIS_fnc_taskSetDestination; //------------------------------------------ Create AO trigger. tower2 = createTrigger ["EmptyDetector", getPos dev1]; tower2 setTriggerArea [20, 20, 0, false]; tower2 settriggerText ""; tower2 setTriggerActivation ["NONE", "PRESENT", false]; tower2 setTriggerStatements ["!alive dev1","['task1','SUCCEEDED'] call BIS_fnc_taskSetState",""]; |
These two code snippets should really help you out when creating a mission. This will make the stamina more realistic. And a lot more fun. Many servers are running old missions with outdated code in them. Creating a new one with proper code is a very good idea, and it is not too difficult. There are so many new features in Arma 3 now, and scripting is fun.
This scripting example will create a marker that shows information about your server.
_num1 = worldName; _num2 = serverName; _markerinfo = createMarker ["Info.", position player ]; _markerinfo setMarkerPos [15545.5,14990.3]; _markerinfo setMarkerShape "ICON"; _markerinfo setMarkerColor "colorBLUFOR"; _markerinfo setMarkerDir 90; _markerinfo setMarkerType "hd_warning"; _markerinfo setMarkerText format ["Invade and Annex %1. %2", _num1, _num2]; |
Have a randomly chosen image as the MP mission loading screen for players.
loadScreen = __EVAL(["\a3\missions_f\data\img\mp_coop_m01_overview_ca.paa","\a3\missions_f\data\img\mp_coop_m02_overview_ca.paa","\a3\missions_f\data\img\mp_coop_m02_overview_ca.paa","\A3\Missions_F\data\img\Showcase_Helicopters_overview_CA.paa","\a3\missions_f\data\img\showcase_infantry_overview_ca.paa","\A3\Missions_F\data\img\Showcase_SCUBA_overview_CA.paa","\A3\Missions_F\data\img\Showcase_Vehicles_overview_CA.paa","\a3\Missions_F_Beta\data\img\SP_FD04_overview_CA.paa","\a3\Missions_F_EPA\data\img\C_EB_overview_CA.paa","\a3\Missions_F_EPA\data\img\C_EA_overview_CA.paa","\a3\Missions_F_EPA\data\img\C_out2_overview_CA.paa","\a3\Missions_F_EPA\data\img\B_hub03_overview_CA.paa"] select floor random 12); |
This adds another dimension to your mission.
Spawn an officer in a Cargo HQ building easily. This is fun to do and would be good for a small mission.
_randPos399 = [_pos , 0, 600, 12, 0, 0.3, 0] call BIS_fnc_findSafePos; _officer = [_randPos399, EAST, ["rhs_vdv_officer"],[],[],[],[],[],232] call BIS_fnc_spawnGroup; ((units _officer) select 0) setVehicleVarName "man1"; man1 = ((units _officer) select 0); ((units _officer) select 0) setpos (_cargo buildingpos random 4); ((units _officer) select 0) disableAI 'PATH'; _officer enableDynamicSimulation true; // enableDynamicSimulation true; |
This code spawns an officer in a random position in a Cargo HQ building. This is very useful for placing an object like a small ammo box as well. I am spawning a group, and _this select 0 is used to select him. Or (units _officer) select 0)
in this case.
Finally, this code will spawn a trigger, that will fire when a soldier or object named man1 is destroyed.
//------------------------------------------ Create AO trigger. _dt2 = createTrigger ["EmptyDetector", getPos _cargo]; _dt2 setTriggerArea [0, 0, 0, false]; _dt2 settriggerText ""; _dt2 setTriggerActivation ["NONE", "PRESENT", false]; _dt2 setTriggerStatements ["!alive man1","[thistrigger] execVM 'scripts\misc\ending.sqf'",""]; //============================================================================================/ |
I use Ace 3 and put load at 0.8. And walk more instead of jogging. If you jog with no load, you can go very far.