Jump to content
Sign in to follow this  
prototype1479

does "_x setskill 1" forEach thisList work?

Recommended Posts

i did and they didnt why it doesnt work? i mean its just writting perfectly fine there shouldnt be any problems

does

 "_x setskill 1" forEach thisList

and 

 "_x allowfleeing 0" forEach thisList

work? if not then how i can make it work

Share this post


Link to post
Share on other sites

To create the list you must use this in a trigger that encompasses the units that you want this to work on.

 

Activation: the side you want effect on (east, west, res) or anybody and  "Present".

 

Put the line of code in the triggers "On Activation" field and it will work.

 

Setskill and AllowFleeing can be anything between 0 and 1 (.1, .25, .5, .75 etc.)

 

To randomize setskill you can also try this:

{_x setSkill (0.4+random 0.4)} forEach thislist;

 

It will randomly add .4 to the .4 skill setting.

  • Like 1

Share this post


Link to post
Share on other sites

this is just basics i know that . so i should have used { instead of " ? is thats the mistake here?

btw i put radius to 0 on each cus i think it affect all the units in the area 

Share this post


Link to post
Share on other sites

Brackets {} and Parenthesis "" are the same thing.

  • Like 1

Share this post


Link to post
Share on other sites

I think i have found the solution

 

 

You must first make this trigger on map ("side"; present, 1 second each) :

 

Condition: this 

 

Activation: name = thislist ; activate = 1

 

 

And then make another trigger ("side"; present, 0 second each) :

 

Condition: activate == 1

 

Activation: {_x setskill 1} foreach name ; hint "test if you want to check if it works"

 

 

Thanks OFP community! ;)

Edited by prototype1479
Solution found ;)

Share this post


Link to post
Share on other sites

You can do it with one trigger really

 

make one trigger ("side"; present, 0 second each) :

 

Condition: this 

 

Activation: {_x setskill 1} foreach thislist;

 

but if the other works for you no worries

Share this post


Link to post
Share on other sites

I tried it, you can try it if you want to here's how to check the AI skill.

 

Set 1 enemy AI. (Skill max)

 

Set yourself on map and have a teammate dead or just lonely on an island.

 

Then start the mission, go prone press F2 (To check how close you are) get 10 - 7 metters to the ai and he will turn back to you. (Don't rush just slowly crawl)

 

Now set the enemy AI's skill to lowest and then start the mission.

 

Go prone get 5m close and they will detect you.

 

So if enemy detects you 10 - 7m on maximum skill and 5m on lowest skill then if you put your trigger and set the enemy skill on 0 then enemy skill would be at maximum and it would work right?

 

But i tried it alot it doesn't work trust me.

 

Regards

- Godfree (Alex)

Share this post


Link to post
Share on other sites

I'm sorry but i don't understand what you want to achieve. What Zulu has written works perfectly, i've just tried it.

Share this post


Link to post
Share on other sites

Do you know how does high/low skill AI behave? How did you know it works? Well, i guess this works for me i should stick with this.

Share this post


Link to post
Share on other sites

I'm not sure this was resolved or not, but

"_x setSkill 1" forEach thislist

works perfectly fine in a trigger set to anybody-present with condition=this.

 

I checked using this

hint format["Skill level is %1", skill unitName]

If I'm not gravely mistaken, skill influences aim precision, movement precision and detection as you said.

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  

×