Hello Mates,
I made a Base Defense Map , where I spawn Waves that attack the Player. I added Objectives now, for killing each Wave. But now I have to set for Example Objective 1 as Complete if Wave 1 was killed.
Thats where im running in circles. I tried to put the Waves in a Group and Count the Number of Living Units each time a Unit dies. But it doesnt work properly.
Here is What I did:
Wave 1
Actions
Unit - Create (2 * SpawnMultiplier) Zergling for player 15 at waypoint1 using default facing (No Options)
Unit Group - Add (Created unit) to Zerg Group[1]
--
Completed if Dead
Events
Unit - Any Unit dies
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
1 <= EnemyWaveNumber <= 8
And
Conditions
(Number of Living units in Zerg Group[1]) == 0
Then
Objective - Mark ("Objective 1" from the Global data table) as Completed
Else
and so on...
But it doesnt work. What am I doing wrong? How to put all Units from a Wave into a Group and Complete Objective when all of the Wave dies?
Please help
0
@SouLCarveRR: Go
"when spawning units do add last created unit to UnitGroup CurrentLevelUnitGroup"
doesnt this add just ONE unit (the last) to the Group or ALL units created with 1 or 2 create commands?
0
Unit Group - Add (Created unit) to Zerg Group[1]
-- Completed if Dead
Events
Unit - Any Unit dies
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
1 <= EnemyWaveNumber <= 8
And
Conditions
(Number of Living units in Zerg Group[1]) == 0
Then
Objective - Mark ("Objective 1" from the Global data table) as Completed
Else and so on... But it doesnt work. What am I doing wrong? How to put all Units from a Wave into a Group and Complete Objective when all of the Wave dies? Please help
0
Hello Mates.
I've done a Base Defense Map where you Build a Base and defend it vs incoming Zerg Waves.
Right now Difficulty is locked to Hard.
now the Questions:
- How do I let the Player choose the Difficulty for the Game
- How do I read which Difficulty he has chosen
- Do I change the Waves then in an IF AND IF , THEN, ELSE IF or how is this done?
Hope you can help me out.
wook