I suggest placing a player starting position in the middle of the base and script it that so when USA (Or other general of your choosing) is in there it transfers the buildings to that player. the way you can do that is to make an area around the middle player starting position and name it "Check For AI" or anything of your choosing. Then name each unit/building you want to be transfered ex: Unit001. Note that each unit has to have it's own unique name. Then go into scripts (edit->scripts) and do the following.
To make A unit Transfered to a player in the begginning of the game or for a different reason (ex: enter area, time expired...) First start by placing the units/buildings you want on the map and give them a name (ex: Unit001.) Give each of the units/building their own unique name and then go into scripts.
For the condition you can do what you want, but for this I'll put it if you wanted it at the begginning of the game.
IF
'True'
THEN
(Player->Transfer->Transfer Unit to player) 'Unit "Unit001" is transfered to the control of player "(LocalPlayer for Player1/host, Teamplayerskirmish____ for that specific AI)"'
Note that having 2 or more of the same skirmish player will result in a crash, and also Note that you can't give units in the form of player1, player2, ect...
Edit: To check for The AI make a script and have it say
IF
(Player->Area)
"Player '____' exists inside of Area '_____' "
Then
(Script->Flag [if not that check for something similar])
"Set Flag 'AIPresent' to 'TRUE'"
Else (If false)
"Set Flag 'AIPresent' to 'FALSE'"
Then you can have The transfer unit scripts have IF "Flag 'AIPresent' = 'TRUE'" instead of just "True"
You can also use this method to destroy the buildings if it the AI isn't the correct general and/or isn't in the correct spot.
Edited by user
19 years ago |
Reason: Not specified
Email me if you ever need help (edited signature November 6th, 2014)