Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
There is no shame however in downloading older mods and scripts and see how it was done in the past.
Best example for clean (albeit mostly obsolete) code is in my opinion the Command Engine 1.2 from "The Chain of Command". They had some cracks working on their stuff back in the days, and most of their coding ethics and examples still make a great standard in ArmA 3 and beyond.
many pre-thanks
//Change weapon sway (0 = disable, 1 = default, >1 = higher sway)
player setCustomAimCoef 0;
//Change recoil (0 = disable, 1 = default, >1 = stronger recoil)
player setUnitRecoilCoefficient 0;
//Slow down time (0 = freeze, 1 = default, >1 = faster)
setAccTime 0.1;
//Speed yourself up (Does not affect ladder climbing
this setAnimSpeedCoef 1.2;
//Fixed firerate (Ridiculously fast shooting)
player addEventHandler ["Fired",{(_this select 0) setWeaponReloadingTime [gunner (vehicle (_this select 0)), currentMuzzle (gunner (vehicle (_this select 0))), 0];}];
//Spawn and attach a goat to every projectile you create.
_spawn = [] spawn {
player addEventHandler ["Fired", {
_null = _this spawn {
_projectile = _this select 6;
_goat = "Goat_Random_F" createVehicle position _projectile;
_goat attachto [_projectile,[0,0,0]];
};
}];
};
//You can hide an object by putting this in its init:
HideObject This;
//If you want soldiers to look in a specific direction, you can hide, say a watch somewere and give it a name and use this command.
This doWatch HiddenWatch_1;
//To lock a unit in either prone, crouching or standing, you can use the following command in its init.
This setUnitPos "UP"; //"UP" for standing, "MIDDLE" for crouch and "DOWN" for lying down.
{ doStop _x } foreach units group this;
Stops making them move into default formation.
doStop this;
This way they will start moving once contact is made, but will stay on position untill that.
Units stay in place:
this disableAI "PATH";