Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //simple AI Skill script v0.1
- //code samples takes from EOS by ENIGMA
- //
- //save this as setSkillv01.sqf and put it in your ..Profile\mpmissions\missionName.mapName\scripts\setSkillv01.sqf
- //put this in init.sqf or initServer.sqf:
- //[] execVM "scripts\setSkillv01.sqf";
- if (!isServer) exitWith {};
- waitUntil {time > 5}; //increase if you have units spawning in at beginning.
- _skillset = [
- 0.25, // aimingAccuracy
- 0.45, // aimingShake
- 0.6, // aimingSpeed
- 0.4, // spotDistance
- 0.4, // spotTime
- 1, // courage
- 1, //endurance
- 1, // reloadSpeed
- 1, // commanding
- 1 // general
- ];
- {
- if ((side _x) == west) then //east for opfor, remove this line and line 35 if you want to change skill on every ai.
- {
- _unit = _x;
- {
- _skillvalue = (_skillset select _forEachIndex) + (random 0.05) - (random 0.05); //Remove the random if you want
- _unit setSkill [_x,_skillvalue];
- } forEach ['aimingAccuracy','aimingShake','aimingSpeed','spotDistance','spotTime','courage','endurance','reloadSpeed','commanding','general'];
- };
- } forEach allUnits;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement