I'm trying to make a solo td, and ive decided to use different computers for the creeps to prevent kill stealing. So, the player food used becomes 0 thing won't work. Now what I was wondering, is why doesnt this work?
Trigger:
SpawnInitialization
Events
Time - Elapsed game time is 10.00 seconds
Unit - A unit Dies
Conditions
(All units of (Units in (Playable map area) owned by hostileCreeps[1]) are dead) Equal to True
(All units of (Units in (Playable map area) owned by hostileCreeps[2]) are dead) Equal to True
(All units of (Units in (Playable map area) owned by hostileCreeps[3]) are dead) Equal to True
Actions
Set levelCount = (levelCount + 1)
Set bonusIncome = (bonusIncome + 10)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
levelCount Equal to (creepCount_lastIndex + 1)
Then - Actions
Wait 2.00 seconds
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Countdown Timer - Create a timer window for creepTimer with title (=== + (Wave + ((String(levelCount)) + ===)))
Countdown Timer - Start creepTimer as a One-shot timer that will expire in 30.00 seconds
Set creepTimerWindow = (Last created timer window)
Countdown Timer - Show creepTimerWindow
Player Group - Pick every player in inGamePlayers and do (Actions)
Loop - Actions
Player - Add bonusIncome to (Picked player) Current gold
Edit: Oops, I forgot to say what happens. It spawns things, but it spawns the wrong computers things.
Edit: Just tested again after fixing some other stuff, and ive found out it always spawns dark green. Could there possibly be a problem with tmpPoint?
Edit: Possible fix:
Hidden information:
Trigger:
SpawnCreeps
Events
Time - creepTimer expires
Conditions
Actions
Countdown Timer - Destroy creepTimerWindow
For each (Integer A) from 1 to creepSpawnCount[levelCount], do (Actions)
Loop - Actions
Wait 1.25 seconds
Player Group - Pick every player in inGamePlayers and do (Actions)
Loop - Actions
Set tmpPoint = ((Picked player) start location)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked player) Equal to Player 1 (Red)
(Picked player) Equal to Player 3 (Teal)
(Picked player) Equal to Player 7 (Green)
(Picked player) Equal to Player 9 (Gray)
Then - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[1] at tmpPoint facing 0.00 degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Picked player) Equal to Player 2 (Blue)
(Picked player) Equal to Player 4 (Purple)
(Picked player) Equal to Player 6 (Orange)
(Picked player) Equal to Player 8 (Pink)
Then - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[2] at tmpPoint facing 0.00 degrees
Else - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[3] at tmpPoint facing 0.00 degrees