mattxr 9 Posted July 6, 2007 Oki Guys Im trying to get this script to work to change the difficuly of the AI. And this is the problem i get. Quote[/b] ]File stra_debug\scripts\Hard.sqf, line 4Error in expression < [""aimingSpeed"", 1]} forEach thisList";, ""]; _t setTriggerArea[50000, 50000, > Error position: <;, ""]; _t setTriggerArea[50000, 50000, > Error Missing ] this is the script. Quote[/b] ]// Create trigger for retrieving all Units and Changing to Hard _t = createTrigger["EmptyDetector", getpos player]; _t setTriggerType "NONE"; _t setTriggerStatements ["this", "{_x setSkill 1; _x setSkill [""aimingAccuracy"", 1]; _x setSkill [""aimingShake"", 1]; _x setSkill [""aimingSpeed"", 1]} forEach thisList";, ""]; _t setTriggerArea[50000, 50000, 0, false]; _t setTriggerActivation["ANY", "PRESENT", false]; Share this post Link to post Share on other sites
5133p39 16 Posted July 6, 2007 You have forgotten additional semicolon after the second element of the setTriggerStatements parameter array, here (see the semicolon near the end of the line, before the third statement array element?): _t setTriggerStatements ["this", "{_x setSkill 1; _x setSkill [""aimingAccuracy"", 1]; _x setSkill [""aimingShake"", 1]; _x setSkill [""aimingSpeed"", 1]} forEach thisList";, ""]; should be like this: _t setTriggerStatements ["this", "{_x setSkill 1; _x setSkill [""aimingAccuracy"", 1]; _x setSkill [""aimingShake"", 1]; _x setSkill [""aimingSpeed"", 1]} forEach thisList", ""]; Share this post Link to post Share on other sites
crashdome 3 Posted July 6, 2007 I thought setSkill with an array is not implemented yet? Share this post Link to post Share on other sites
5133p39 16 Posted July 6, 2007 I thought setSkill with an array is not implemented yet? Some say it isn't, some say it actually does SOMETHING. But i haven't seen any proof yet. Share this post Link to post Share on other sites
mattxr 9 Posted July 6, 2007 Works in Editor in a Trigger. Share this post Link to post Share on other sites
5133p39 16 Posted July 6, 2007 Works in Editor in a Trigger. Which means? ...that it won't give you an error, or that it actually really does something? that its use does have any apparent effect? Share this post Link to post Share on other sites
mattxr 9 Posted July 7, 2007 When i tested it with the skill level at 0 the AI was dumb as fuck. Turning there weapons into the sky shooting standing up and being noobs and they couldnt even hit anything although sometimes they did, they fired rpgs at you and everything then when you setskill 1 they are much more accurate and faster at shooting you. and you get the odd rpg that acctualy hits you lol. i done major testesing with this to see the differnt effects. i knw Share this post Link to post Share on other sites
Second 0 Posted July 7, 2007 That is caused by skill (plain this setskill x) being at 0... raising it to 0.1 and they aren't (so) braindead anymore. OFP had bit same effect. It generates very odd behaviour... I tested it too, i know EDIT: But this: ; _x setSkill [""aimingAccuracy"", 1]; _x setSkill [""aimingShake"", 1]; _x setSkill [""aimingSpeed"", 1] doesn't have anything to do with it, this far i've seen in my tests only setskill to have effect to anything. Share this post Link to post Share on other sites