Jump to content
Sign in to follow this  
mattxr

Script Help

Recommended Posts

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 4

Error 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

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

I thought setSkill with an array is not implemented yet? huh.gif

Share this post


Link to post
Share on other sites
I thought setSkill with an array is not implemented yet? huh.gif

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

Works in Editor in a Trigger.

Share this post


Link to post
Share on other sites
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

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 thumbs-up.gif

Share this post


Link to post
Share on other sites

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 tounge2.gif

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×