no. you have to find a condition when you respawn ALL of them at once. for example:
if all of them are dead you start the countdown.
if the countdown expired you run the script which checks the "checkpoint" counter to respawn all the units at once at the related checkpoint waypoints.
so all in all you need something like this:
Put ALL the following scripts into a new folder into SkirmishGLA scripts:
Detection script (do NOT deselect "deactivate uppon success"):
*IF*
Unit 1 is dead
AND
Unit 2 is dead
AND
Unit 3 is dead
AND
Unit 4 is dead
AND
Unit 5 is dead
AND
Unit 6 is dead
*THEN*
Set Timer "Respawn" to expire in 5 seconds.
Respawn script 0 (deselect "deactivate uppon success"):
*IF*
Counter "checkopint" is equal to 0.
AND
Timer "Respawn" expired
*THEN*
Set Timer "Respawn" to expire in 100000 seconds.
Spawn Unit 1 of type Lotus on Team SkirmishGLA at waypoint Respawn0_1
Spawn Unit 2 of type Redguard on Team Skirmish GLA at waypoint Respawn0_2
Spawn Unit 3 of type Redguard on Team Skirmish GLA at waypoint Respawn0_3
Spawn Unit 4 of type Redguard on Team Skirmish GLA at waypoint Respawn0_4
Spawn Unit 5 of type Ranger on Team Skirmish GLA at waypoint Respawn0_5
Spawn Unit 6 of type Burton on Team Skirmish GLA at waypoint Respawn0_6
Enable Script "Unit Transfer1"
Enable Script "Unit Transfer2"
Enable Script "Detection script"
Respawn script 1 (deselect "deactivate uppon success"):
*IF*
Counter "checkopint" is equal to 1.
AND
Timer "Respawn" expired
*THEN*
Set Timer "Respawn" to expire in 100000 seconds.
Spawn Unit 1 of type Lotus on Team SkirmishGLA at waypoint Respawn1_1
Spawn Unit 2 of type Redguard on Team Skirmish GLA at waypoint Respawn1_2
Spawn Unit 3 of type Redguard on Team Skirmish GLA at waypoint Respawn1_3
Spawn Unit 4 of type Redguard on Team Skirmish GLA at waypoint Respawn1_4
Spawn Unit 5 of type Ranger on Team Skirmish GLA at waypoint Respawn1_5
Spawn Unit 6 of type Burton on Team Skirmish GLA at waypoint Respawn1_6
Enable Script "Unit Transfer1"
Enable Script "Unit Transfer2"
Enable Script "Detection script"
Unit Transfer1 (do NOT deselect "deactivate uppon success", but deselect "Script is active"):
*IF*
Unit 'transfer house 1' is owned by Player 'player0'
*THEN*
Unit '1' is transferred to the command of Player 'player0'
Unit '2' is transferred to the command of Player 'player0'
Unit '3' is transferred to the command of Player 'player0'
*ELSE*
Unit '1' is transferred to the command of Player 'player1'
Unit '2' is transferred to the command of Player 'player1'
Unit '3' is transferred to the command of Player 'player1'
Unit Transfer2 (do NOT deselect "deactivate uppon success", but deselect "Script is active"):
*IF*
Unit 'transfer house 2' is owned by Player 'player1'
*THEN*
Unit '4' is transferred to the command of Player 'player1'
Unit '5' is transferred to the command of Player 'player1'
Unit '6' is transferred to the command of Player 'player1'
*ELSE*
Unit '4' is transferred to the command of Player 'player0'
Unit '5' is transferred to the command of Player 'player0'
Unit '6' is transferred to the command of Player 'player0'
Of course you need checkpoint scripts which set the counter "checkpoint".
checkpoint = 0 means, that you havent reached the first checkpoint yet.
if you reach something like "checkpoint area 1" with any unit
then you set the counter checkpoint to 1
of course you can create more checkpoints, then you of course have to copy the script "
Respawn script 0" and set it for checkpoint 3, 4, 5 whatever.
If you still cant do it, upload your map and ill script it for you.
Edited by user
14 years ago |
Reason: Not specified