HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawning question for a td

09-13-2009, 06:46 PM#1
T3RMINUS
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
Collapse Events
Time - Elapsed game time is 10.00 seconds
Unit - A unit Dies
Collapse 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
Collapse Actions
Set levelCount = (levelCount + 1)
Set bonusIncome = (bonusIncome + 10)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
levelCount Equal to (creepCount_lastIndex + 1)
Collapse Then - Actions
Wait 2.00 seconds
Game - Victory (Picked player) (Show dialogs, Show scores)
Collapse 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
Collapse Player Group - Pick every player in inGamePlayers and do (Actions)
Collapse 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.
09-13-2009, 08:09 PM#2
Cheezeman
Could you post the second trigger aswell, the one which is fired when creepTimer is out?
09-13-2009, 11:17 PM#3
T3RMINUS
Here ya go:
Trigger:
SpawnCreeps
Collapse Events
Time - creepTimer expires
Conditions
Collapse Actions
Countdown Timer - Destroy creepTimerWindow
Collapse For each (Integer A) from 1 to creepSpawnCount[levelCount], do (Actions)
Collapse Loop - Actions
Wait 1.25 seconds
Collapse Player Group - Pick every player in inGamePlayers and do (Actions)
Collapse Loop - Actions
Set tmpPoint = ((Picked player) start location)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Red <gen> contains tmpPoint) Equal to True
(Teal <gen> contains tmpPoint) Equal to True
(Green <gen> contains tmpPoint) Equal to True
(Gray <gen> contains tmpPoint) Equal to True
Collapse Then - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[1] at tmpPoint facing 0.00 degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
(Blue <gen> contains tmpPoint) Equal to True
(Purp <gen> contains tmpPoint) Equal to True
(Orange <gen> contains tmpPoint) Equal to True
(Pink <gen> contains tmpPoint) Equal to True
Collapse Then - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[2] at tmpPoint facing 0.00 degrees
Collapse Else - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[3] at tmpPoint facing 0.00 degrees
Custom script: call RemoveLocation ( udg_tmpPoint )
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
Collapse Events
Time - creepTimer expires
Conditions
Collapse Actions
Countdown Timer - Destroy creepTimerWindow
Collapse For each (Integer A) from 1 to creepSpawnCount[levelCount], do (Actions)
Collapse Loop - Actions
Wait 1.25 seconds
Collapse Player Group - Pick every player in inGamePlayers and do (Actions)
Collapse Loop - Actions
Set tmpPoint = ((Picked player) start location)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse 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)
Collapse Then - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[1] at tmpPoint facing 0.00 degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse 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)
Collapse Then - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[2] at tmpPoint facing 0.00 degrees
Collapse Else - Actions
Unit - Create 1 creepArray[levelCount] for hostileCreeps[3] at tmpPoint facing 0.00 degrees
Custom script: call RemoveLocation ( udg_tmpPoint )
09-16-2009, 11:48 PM#4
T3RMINUS
Still doesnt work... bump
09-20-2009, 07:35 PM#5
T3RMINUS
bump?