ToM666 1 Posted September 27, 2013 Hi guys The map I have made "Operation Chemo" relies for the most part on the EOS system by bangabob to provide enemy occupation. Is there any way to globally set the variable for AI, kill, armour, accuracy etc when there is a script such as this spawning the enemy troops for you? Share this post Link to post Share on other sites
Johnson11B2P 3 Posted September 27, 2013 Use the setSKill command inside a for allUnits loop for their skill. Share this post Link to post Share on other sites
ToM666 1 Posted September 28, 2013 Use the setSKill command inside a for allUnits loop for their skill. Hi mate. Do you put that in a trigger? Also, can you set accuracy in the same way. That is the biggest issue for me. I want the AI to be skill ful just not aimbot skillfull LOL. Share this post Link to post Share on other sites
Zenophon 110 Posted September 28, 2013 You do not need a trigger, just put this in the init field of a unit: 0 = [0.2] spawn { while {true} do { sleep 10; { _x setSkill ["aimingAccuracy", (_this select 0)]; } forEach allUnits; }; } Change '0.2' to any number between 0 and 1. You only need to run this once; it will take care of all units you spawn later. Share this post Link to post Share on other sites
cuel 25 Posted September 28, 2013 (edited) snip did not read Edited September 28, 2013 by cuel Share this post Link to post Share on other sites
ToM666 1 Posted September 29, 2013 You do not need a trigger, just put this in the init field of a unit: 0 = [0.2] spawn { while {true} do { sleep 10; { _x setSkill ["aimingAccuracy", (_this select 0)]; } forEach allUnits; }; } Change '0.2' to any number between 0 and 1. You only need to run this once; it will take care of all units you spawn later. So if I am using Bangabobs EOS. I just need to place one OPFOR soldier anywhere on the map with this code in the init field and it will ensure all AI that spawn in the activated zones have the same accuracy setting? Would this also work if I put it in the init.sqf? Share this post Link to post Share on other sites
delta99 34 Posted September 29, 2013 It is probably better to figure out how to run this once for each spawned unit. Otherwise this is running every 10 seconds on every unit which is not a good idea. Share this post Link to post Share on other sites