Hello,
I did a little test of my own. I created a new player called "TankTeam".
In the script writing area inside this new player's folder I made an
NonActive script called "MakeUnManned" and so the setting for this script is [ns na D] with the following script.
*** IF ***
True.
*** THEN ***
Make Team 'teamTankTeams' unmanned.
The condition for creating your units can be whatever you want but each time you create the unit, activate your "MakeUnManned" script. So at the very basic level you'd have this.
*** IF ***
True.
*** THEN ***
Spawn unit of type 'AmericaTankCrusader' on Team 'teamTankTeams' at waypoint Waypoint 'SpawnPoint'
Enable Script 'MakeUnmanned'.
I also played around with adding counters and timers, first setting the counter to zero with a Separate script like this.
*** IF ***
True.
*** THEN ***
Set 'LimitTeam1' to 0
And a Timer script like this.
*** IF ***
True.
*** THEN ***
Set timer 'Delay1' to expire in 8.00 seconds.
And then adding timer condition check and an "Add To Counter" line to the spawn side of the script like this.
*** IF ***
Timer 'Delay1' has expired.
*** THEN ***
Spawn unit of type 'AmericaTankCrusader' on Team 'teamTankTeams' at waypoint Waypoint 'SpawnPoint'
Enable Script 'MakeUnmanned'.
Add 1 to counter 'LimitTeam1'
Enable Script 'MakeATankPing'.
Notice I enabled a "Ping script". This is used to reset things and check the unit count. It goes like this.
*** IF ***
Counter 'LimitTeam1' IS Less Than 2
*** THEN ***
Enable Script 'DelayTime'.
Enable Script 'MakeATank'.
If you only wanted this script and timer activated after the unit is captured then I would make an Area around the spawn point and add a "unit check" line to the ping script like this.
*** IF ***
Counter 'LimitTeam1' IS Less Than 2
*AND* Player 'TankTeams' has Less Than 1 unit or structure of type 'AmericaTankCrusader' in the area 'DetectionZone'
*** THEN ***
Enable Script 'DelayTime'.
Enable Script 'MakeATank'.
This would mean that after the unit is captured, player "TankTeams" no longer has a unit in this location and so the timer and spawn scripts are reactivated.
Like I said, you can make the condition whatever you want. I'm throwing out some ideas.
Hope this helps.
Edited by user
16 years ago |
Reason: Not specified