Jump to content

(Final Alert 2) Is there a way to split a team?


Recommended Posts

The exact function I'm looking for is a way to split a taskforce into two teams that each follow a different script. The idea is for a bus to arrive at a waypoint (done successfully), unload troops (done successfully), troops attack nearest enemy (done successfully) with the busses leaving map and being deleted with the unit delete action (the issue). 


Would a workaround be to have the bus and units to start off as different taskforces, the units embark onto the bus, then attack after disembarking while the busses leave elsewhere?

Link to comment
Share on other sites

you are going to have to use local variables and recruitment logic in your scripting;

1- make first team with taskforce 'bus + troops'. check "team members recruitable"
2- make 2nd team with taskforce 'bus only'. check "recruiter"
3- make a local variable
4- script the first team to move and deploy the troops as normal, but add in 'set local' script action after deploying
5- script the second bus only team to simply leave the map or whatever
6- make a trigger with the trigger event being 'local set' and with the trigger action(4) 'create team'. set teamtype to the 2nd team

so what will happen is your first bus team will go in and deploy and its troops will go on with the script as normal. but before moving on they will set a local, and the local will act as an event to fire a trigger. the trigger will then create a team and through the power of recruitment the now empty and teamless bus will be picked up into the 2nd team, where it will follow through with its new teamtypes script; leaving and deleting itself in this case.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...