Jump to content
Sign in to follow this  
pappagoat

Help - Post parajump: AI detach from group if distant from player

Recommended Posts

Trying to make a script so that after a parachute jump, once all team members are on the ground, any that are 150 meters from the player after a certain time leave the players group. I've made the below but have been getting errors I have not been able to resolve:

 

waitUntil {{_x isTouchingGround;} forEach units group player};
sleep 45;
{if ((player distance _x) > 150) then ([_x] join grpNull; _x groupChat "Unable to RV with you, proceeding independently."; sleep 3;) } forEach units group player;

Share this post


Link to post
Share on other sites
2 hours ago, pappagoat said:

Trying to make a script so that after a parachute jump, once all team members are on the ground, any that are 150 meters from the player after a certain time leave the players group. I've made the below but have been getting errors I have not been able to resolve:

 

waitUntil {{_x isTouchingGround;} forEach units group player};
sleep 45;
{if ((player distance _x) > 150) then ([_x] join grpNull; _x groupChat "Unable to RV with you, proceeding independently."; sleep 3;) } forEach units group player;

If you're not sharing the errors you're getting it's unlikely this forum will solve them.

To find possible causes for errors it's always worth it to visit the wiki entries for the respective script commands you're using *hint hint*.

Especially if you're not too sure you've got the syntax right.

 

Cheers

Share this post


Link to post
Share on other sites
On 3/3/2019 at 8:25 AM, Grumpy Old Man said:

If you're not sharing the errors you're getting it's unlikely this forum will solve them.

To find possible causes for errors it's always worth it to visit the wiki entries for the respective script commands you're using *hint hint*.

Especially if you're not too sure you've got the syntax right.

 

Cheers

 

 

Right, what I get is:

 

line 21 (see next line below)

waitUntil {{_x isTouchingGround;} count (units group player) == {alive _x} count (units group player);};

Error Missing ;

Share this post


Link to post
Share on other sites
25 minutes ago, pappagoat said:

 

 

Right, what I get is:

 

line 21 (see next line below)

waitUntil {{_x isTouchingGround;} count (units group player) == {alive _x} count (units group player);};

Error Missing ;

Well did you take a look at the link I posted?

 

Cheers

Share this post


Link to post
Share on other sites

and also the error:

 

line 21 (see next line below)

I#IwaitUntil {{_x isTouchingGround;} count (units group player) == {alive _x} count (units group player);};

Error Generic error in expression

Share this post


Link to post
Share on other sites
3 minutes ago, Grumpy Old Man said:

Well did you take a look at the link I posted?

 

Cheers

 

Yes

Share this post


Link to post
Share on other sites
26 minutes ago, pappagoat said:

 

Yes

Check the syntax of isTouchingGround, you got the order wrong, should be isTouchingGround _x.

 

Cheers

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  

×