- Joined
- Feb 28, 2013
- Messages
- 1,897
Okay this has to be the third and probably the last thing that i wanted to ask for help *oh and apologies if i am asking help too much*
Anyway, i want to make a survival game where there will be unlimited waves of enemy to encounter.
So here are the things to take note:
-Finishing each wave must have 30 seconds of wait, a countdown timer must start and when it expires, it will start another wave.
-There is 10 bandits to spawn on first wave
-On every wave, 1 bandit will be added
-On the fifth wave, the footmen will be added
-On every wave (after the fifth wave), 1 footman will be added
-On the tenth wave, the knights will be added
-On every wave (after the tenth wave), 1 knight will be added
-On the fifteenth wave, ogres will be added
And so on... and every 5 waves, new units-type will be added.
-Enemies will all spawn in one region.
-Enemies are owned by player 2.
-Countdown timer will restart and show up again when all enemies are down.
I know this can be done in the loop. I already made something, but it takes 1 trigger every wave, what i want is to make it "simpler", and 3 triggers seems enough, where:
-first trigger : units that will be created, loop is here
-second trigger : the countdown timer, when it expires, it runs first trigger to spawn enemies.
-third trigger : the trigger where it check if player 2 still exists, if not, start second trigger.
(It is not really necessary to make only 3 triggers, i just wanted something that is working)
For those who will help, it will be appreciated and i will be thankful.
---
And yes it is associated with the one i asked before : http://www.hiveworkshop.com/forums/...ing-player-using-triggers-275928/#post2790611
Where the structure must be defended, when the structure 1 is destroyed, player 2 units will attack the second one, and so on.
Anyway, i want to make a survival game where there will be unlimited waves of enemy to encounter.
So here are the things to take note:
-Finishing each wave must have 30 seconds of wait, a countdown timer must start and when it expires, it will start another wave.
-There is 10 bandits to spawn on first wave
-On every wave, 1 bandit will be added
-On the fifth wave, the footmen will be added
-On every wave (after the fifth wave), 1 footman will be added
-On the tenth wave, the knights will be added
-On every wave (after the tenth wave), 1 knight will be added
-On the fifteenth wave, ogres will be added
And so on... and every 5 waves, new units-type will be added.
-Enemies will all spawn in one region.
-Enemies are owned by player 2.
-Countdown timer will restart and show up again when all enemies are down.
I know this can be done in the loop. I already made something, but it takes 1 trigger every wave, what i want is to make it "simpler", and 3 triggers seems enough, where:
-first trigger : units that will be created, loop is here
-second trigger : the countdown timer, when it expires, it runs first trigger to spawn enemies.
-third trigger : the trigger where it check if player 2 still exists, if not, start second trigger.
(It is not really necessary to make only 3 triggers, i just wanted something that is working)
For those who will help, it will be appreciated and i will be thankful.
---
And yes it is associated with the one i asked before : http://www.hiveworkshop.com/forums/...ing-player-using-triggers-275928/#post2790611
- Buildings
- Events
- Map initialization
- Conditions
- Actions
- Set Building[0] = Farm 0000 <gen>
- Set Building[1] = Farm 0001 <gen>
- Set Building[2] = Farm 0002 <gen>
- Set Building[3] = Farm 0003 <gen>
^could be optimized to
- Test
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- Set TempBoolean = False
- For each (Integer TempInteger) from 0 to 3, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Building[(TempInteger)] is alive) Equal to True
- Then - Actions
- Set TempBoolean = True
- Custom script: exitwhen true
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- TempBoolean Equal to True
- Then - Actions
- Custom script: set bj_wantDestroyGroup = true
- Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Actions)
- Loop - Actions
- Unit - Order (Picked unit) to Attack Building[(TempInteger)]
Where the structure must be defended, when the structure 1 is destroyed, player 2 units will attack the second one, and so on.
Last edited: