There has been a number of people asking about making teams for missions, so I'll just post the basics here.
Make your players and set them as enemies. All players except the human player should be AI controlled. Don't forget to add PlyrCivilian. Add buildings for the enemy using the object tool or a better option for missions is the Build List tool. If using the latter, set the building to already built. Now for some scripting.
Make a script in the enemy folder to activate the player (Change names as needed). Setting: [ns A D].
Script Name: GLASetup
*** IF ***
True.
*** THEN ***
Player 'GLAEnemy' gets $ 1000000
Player 'GLAEnemy' is able to build units.
Make a subroutine script to trigger team production. Setting [S A nd].
Script name: Attack1
*** IF ***
True.
*** THEN ***
Null operation. (Does nothing.)
Make a subroutine script to trigger team attack. Setting [S A nd].
Note:
This script can be used by all teams.
Script Name: Hunt
*** IF ***
True.
*** THEN ***
Team '<This Team>' begins hunting.
Make a subroutine script to RUN the first script if team is taken out. Setting [S A nd].
Script Name: RunAttack1
*** IF ***
True.
*** THEN ***
Run Subroutine 'Attack1'.
Now on the team creation page, select your enemy player and click the button to make a new team. Name this team "Attack1". Under "Production Condition" find the script you made called "Attack1". Add a small number of units, say 3 infantry. This will create the team.
On the behavior tab, in the section "On Create" select the "Hunt" script.
For the "On Destroyed", select the script "RunAttack1".
That is it! Your team will be built, then hunt and when it's taken out the team will be built again.
Copy the script Attack1 and RunAttack1 and edit the numbers for making more teams. Then go to the team section again and copy the first team and edit to use appropriate scripts of each team.
Note: Only build teams with units that can be built in the buildings you've placed for the player. You can mix factions in teams if the buildings are placed for this player.
Keep teams small but make more of them.
For AOD Style SpawningFor spawning make your teams first in the team section. Then in the script section, under Team/Create, use Spawn a Reinforcement team. Select the team you made. You would make a timer script something like this. Adjust timing and add more as needed.
*** IF ***
True.
*** THEN ***
Set timer 'Wave1' to expire in 60.00 seconds.
Set timer 'Wave2' to expire in 120.00 seconds.
Set timer 'Wave3' to expire in 360.00 seconds.
Set timer 'Wave4' to expire in 500.00 seconds.
Set timer 'Wave5' to expire in 600.00 seconds.
Set timer 'Wave6' to expire in 720.00 seconds.
Then you just have your wave scripts like this.
*** IF ***
Timer 'Wave1' has expired.
*** THEN ***
Spawn an instance of Team 'Wave1' at Waypoint 'WaveSpawn1'.
Note: Like you did for building teams, make a Hunt or follow pathway Subroutine script that can be used by all teams. Setting [S A nd].
Select this script for the "On Create" action for each team.
HAVE FUN!
Edited by user Tuesday, July 7, 2009 9:08:03 PM(UTC)
| Reason: Not specified