dazza 13 Posted September 18, 2021 Hi, I'm very new at coding, and struggling with this command. Trying to addaction a SLOW and NORMAL speed for my AI whenever I want they to proceed slowly to a waypoint. Originally I had it working with Setspeed "Limited", but I was playing with the idea of forcing them to walk slow while in DANGER mode too. I discovered ForceWalk might be my solution, but whenever I try it, I get "...Type Group expected Object File myspeed\SLOW/sqf..., line1" as an error. Can I please get someone's eyes to look at it and figure out where I'm going wrong please? Much appreciated! I've currently got (bold are folder names): config.cpp class CfgPatches { class Myspeed { units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {"Extended_EventHandlers"}; }; }; class Extended_PostInit_EventHandlers { Myspeed_Post_Init = "TAG_myAddon_Post_Init_Var = [] execVM ""Myspeed\init.sqf"""; }; init.sqf player addaction ["SLOW","myspeed\SLOW.sqf"]; player addaction ["NORMAL","myspeed\NORMAL.sqf"]; NORMAL _playerGrp = Group player; _playerGrp forceWalk false; SLOW _playerGrp = Group player; _playerGrp forceWalk true; Share this post Link to post Share on other sites
Maff 251 Posted September 18, 2021 The forceWalk command needs to be run on individual units. // This should work. // NORMAL { _x forceWalk false; } forEach units player; // SLOW { _x forceWalk true; } forEach units player; 1 Share this post Link to post Share on other sites
dazza 13 Posted September 18, 2021 That's amazing mate! I've already plugged it in and tested it. Totally works! Is there a way to forceWalk my AI teammates without the forceWalk affecting myself (player)? Really appreciate your help and reply Share this post Link to post Share on other sites
dazza 13 Posted September 18, 2021 Wait! Nvm solved it 😄 Share this post Link to post Share on other sites
Play3r 147 Posted September 19, 2021 On 9/18/2021 at 5:40 PM, dazza said: Wait! Nvm solved it 😄 How did you solve it so other can use it.. 1 Share this post Link to post Share on other sites
phronk 898 Posted September 19, 2021 { _x forceWalk true; } forEach units player - [player]; 4 1 Share this post Link to post Share on other sites
dazza 13 Posted October 5, 2021 On 9/20/2021 at 6:34 AM, Play3r said: How did you solve it so other can use it.. { _x forceWalk true; } forEach units player; player forceWalk false; Not elegant, but worked like a charm. 2 1 Share this post Link to post Share on other sites