Jump to content
Sign in to follow this  
iAssault

How do i stop AI from going prone?

Recommended Posts

Hi there,

I would like to stop the AI from laying down as soon as they see an enemy.

I had a little search of the forum before hand and had no luck pulling up the script that keeps them on thier toes.

If anyone knows the script to make my soldiers brave once again then it would be much appreciated. :)

Sorry for starting a new topic about it, i was just looking for a quick answer.

Thanks

Share this post


Link to post
Share on other sites

Select the units and press 7 then select the stance. "Keep low" for auto mode.

Share this post


Link to post
Share on other sites

I mean in regards to mission editor, i want to see some AI infantry fighting in a village but they hug the ground as soon as they spot the enemy, i don't want them to lay down at all.

Share this post


Link to post
Share on other sites

Thanks a lot Big D, i did search but i obviously didn't type in the best keywords.

Cheers again

Share this post


Link to post
Share on other sites

Use this in a trigger...

{_x setunitpos "UP"} foreach thislist;

...and all units within the trigger area will stand.

Share this post


Link to post
Share on other sites
Use this in a trigger...

{_x setunitpos "UP"} foreach thislist;

...and all units within the trigger area will stand.

Type nothing expected Bool

Share this post


Link to post
Share on other sites

Wanted to do the same thing and put it in but nothing happens. (there in the area and its on act and everybody triggers it)

Share this post


Link to post
Share on other sites

Please can someone teach me in details how to make that trigger?

Thanks :D

Share this post


Link to post
Share on other sites

Well it workted, sort off some people will still go down. But maybe there hit in the legs.

Please can someone teach me in details how to make that trigger?

Thanks :D

Make a trigger and set both 50 - 50 to 1000 - 1000 (AOE) then set it to Activation: Anybody, Repeatedly, Present then put the command line:

{_x setunitpos "UP"} foreach thislist;

under on act.

And you got your self a working trigger.

Edited by Darvo

Share this post


Link to post
Share on other sites
Well it workted, sort off some people will still go down. But maybe there hit in the legs.

Yes when injured they go prone, but spetznaz tend to prone now and then even when not injured :confused:

Share this post


Link to post
Share on other sites

What i about if i want to let the ai stand and kneel but only remove the ability of him going prone?? is there a line of code for that??

Share this post


Link to post
Share on other sites

This is from a different thread, but it could be useful. The triggers I use are activated based on the distance from the leader, but you could base it on the distance from something else, like an object or marker.

When I make Coop or SP missions with AI on my team I, I often get annoyed that they just stand up all the time when most the time when they are near me I would prefer that they crouch without my having to constantly tell them to crouch. So I came up with a cool idea. I added to triggers to my mission for each AI teammate. So lets say I am the leader (s1) and I told an AI teammate (s2) to regroup, and I am crouched behind a short wall observing a bunch of enemy and I don't want my dumb AI teammate to run over to me and just stand there like "duh" and get spotted by the enemy and give my position away or start firing.

The 1st trigger tells the AI to stand if he is over 25 meters away. This keeps him moving fast when I need him to keep up with me.

Trigger 1:

Radius: 0

Activation: None, Repeatedly

Condition: s2 distance s1>25

OnAct: s2 setUnitPos "UP"

The 2nd trigger tells the AI to crouch if he is within 25 meters of my position. Now I don't have to give him an order to keep low.

Trigger 2:

Radius: 0

Activation: None, Repeatedly

Condition: s2 distance s1<25

OnAct: s2 setUnitPos "MIDDLE"

So now my AI teammate runs fast to my position and when he gets within 25 meters he crouches and moves slower and then stops an kneels next to me and does not fire because he would have to stand in order to be able to shoot over the short wall. At anytime I can give him the order to stand up and he will. The triggers will make him crouch again later since they repeat.

So in most of my missions where I have about 14 teammates, I add triggers that make all of my AI teammates crouch when they are close to my position. It actually makes them seem smarter and very stealth oriented, lol.

Share this post


Link to post
Share on other sites

okay, ive never used scripts, can somebody please tell me exactly what im supposed to do here? please n thank ya. I have a Franco Prussian war mod and it looks funky when all my troops lay down once they are under fire. not really Time era correct. Haha

Share this post


Link to post
Share on other sites

okay, ive never used scripts, can somebody please tell me exactly what im supposed to do here? please n thank ya. I have a Franco Prussian war mod and it looks funky when all my troops lay down once they are under fire. not really Time era correct. Haha

You can place an AI infantry group and place this code in the team leader's init -

grp1 = group this;{_x setunitPos "UP"} foreach units grp1;{_x setBehaviour "COMBAT"} foreach units grp1;

For many infantry groups name them as grp2, grp3, grp4.....etc. and use same code written as above.

Share this post


Link to post
Share on other sites
On 6.10.2015 at 11:44 PM, amx225 said:

You can place an AI infantry group and place this code in the team leader's init -

grp1 = group this;{_x setunitPos "UP"} foreach units grp1;{_x setBehaviour "COMBAT"} foreach units grp1;

For many infantry groups name them as grp2, grp3, grp4.....etc. and use same code written as above.

 

I know the last post on this topic is 2 years old, but if someone would be able to explain that a bit further i would be very thankfull. I spent the last night trying to get my units to keep standing, but i just dont know where to put the quoted command line. Also, i have not found a way to set a trigger to 'on Activation'. The reason for that could however be that this type of command doesnt exist in the current version of the game, or i just am blind. So, where is the team leaders init? Where do i put the command line? 

Share this post


Link to post
Share on other sites
On 04/10/2015 at 5:18 AM, ianardo said:

okay, ive never used scripts, can somebody please tell me exactly what im supposed to do here? please n thank ya. I have a Franco Prussian war mod and it looks funky when all my troops lay down once they are under fire. not really Time era correct. Haha

hey, just wondering what that franco prussian mod is, as i have been looking for a decent one for a looong time,

thanks in advance :)

Share this post


Link to post
Share on other sites
On 05/10/2017 at 3:43 AM, MalteFC said:

 

I know the last post on this topic is 2 years old, but if someone would be able to explain that a bit further i would be very thankfull. I spent the last night trying to get my units to keep standing, but i just dont know where to put the quoted command line. Also, i have not found a way to set a trigger to 'on Activation'. The reason for that could however be that this type of command doesnt exist in the current version of the game, or i just am blind. So, where is the team leaders init? Where do i put the command line? 

teamleader's init can be found when you double click on him, there are some tabs that you can open and one of them is its init. It's an empty space where you can just paste your command line, same as "on activation", double click on the trigger and scroll down until you see the empty space entitled "on activation", it's just what line of command the trigger will run... you guessed it, on activation.

hope i was of some help

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  

×