Jump to content
meatball

Join and later Remove AI unit from group

Recommended Posts

I've got part of this figured out but was hoping someone could help me out.

  • I have 2 units in game. 1 Player unit (test1) and 1 AI unit (test2).
  • In the init field of player 1 I have 'testGroup = group this;'
  • 1st Trigger (trigAdd) near the AI unit that triggers on the player moving into the trigger field with an On Act of '[test2] joinsilent testGroup;'
  • 2nd trigger (trigRemove) 50m away that triggers on the AI unit moving in with the condition of '({_x in thisList} count [test2]) > 0;' and on Act. of '[test2] joinsilent otherGroup;hint "Remove";' (Also tried 'otherGroup = group test2;' with no luck)

When I take the player unit into trigAdd, the AI unit joins my group and starts following me. When I run into trigRemove, I see the hint fire, but the AI unit will not drop from my group. Any idea how to force an AI unit to drop from a player group? I've tried just about everything I can find in the forums but can't get it working.

Edited by Meatball

Share this post


Link to post
Share on other sites

try:

[test2] joinSilent grpNull

instead of

[test2] joinsilent otherGroup

Share this post


Link to post
Share on other sites

how do I have the unit board a vehicle after they leave the group?

s1 is me in paragrp

s2 is the other unit which will join paragrp, then leave paragrp and join boatgrp

boat i need s2 to board after he leaves my group is boat1, boat1 is in boatgrp

What would I put into the leave group trigger ON ACT. to get s2 to board the boat that's waiting.

so far that trigger has

({_x in thisList} count [s2]) > 0; //for the Condition

[s2] joinsilent boatgrp; //for the ON ACT.

I've tried to give s2 a hold waypoint synced to the join paragrp trigger, then a waypoint of GetIn by the boat. That didnt work. I tried to have s2 join grpnull with the waypoints, that didnt work. When s2 joins boatgrp, he moves past the leave group trigger, but never boards the boat. When s2 joins grpnull, he just stops dead in his tracks soon as he enters the leave trigger.

edit:

I figured it out. I placed a 4 man recon team grouped as grprecon at the beach. Had s2 join them. Had them with a move waypoint synced to a 15 second countdown trigger grouped to me, then a gave them a getin waypoint synced to a load waypoint for the boat and put

{_x in boat1} count (units grprecon) == {alive _x} count (units grprecon);

into the Condition for the load waypoint.

Tested it, and s2 left my group, joined grprecon, 15seconds later they boarded the boat, once all were onboad, the boat sped off to it's next waypoint.

Edited by RTEK

Share this post


Link to post
Share on other sites

You need to assign a vehicle to that unit and allow the unit to get in.

Use these:

https://community.bistudio.com/wiki/assignAsCargo

https://community.bistudio.com/wiki/allowGetIn

https://community.bistudio.com/wiki/orderGetIn

by using these three commands from top to bottom they will always get in as long as there's space in the vehicle.

setting the last two commands to false will make a unit disembark a vehicle, when the unit is in a chopper the chopper will try to land, let the unit out and continue on his old waypoints.

Share this post


Link to post
Share on other sites

Sorry to bother everyone, but this seems like a proper group to ask. I still have AGM, simply because I can hotkey things better than in ACE3. Is there a mod that will allow me to simply join an AI group, leave, & change my team colour, even if it is just affecting me? SinglePlayer only, I don't do MP.

Share this post


Link to post
Share on other sites

Sorry to bother everyone, but this seems like a proper group to ask. I still have AGM, simply because I can hotkey things better than in ACE3. Is there a mod that will allow me to simply join an AI group, leave, & change my team colour, even if it is just affecting me? SinglePlayer only, I don't do MP.

 

Trigger OnACT:

[AI] join player1;

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

×