| 12-08-2004, 02:39 AM | #1 |
Okay, I decided that I should post my overall simple creep respawn system, used for RPGs and stuffy or whatnot. - GUI! Easy. - Uses Integer As and Arrays. Really green mappers, beware..? - Uses two triggers. - Not sure if it memory leaks or not, but.. So, theres the triggers.. Anyways, if anyone can suggest how I can polish this up, go ahead and speak up! Code:
Startup
Events
Map initialization
Conditions
Actions
Set Spawns[1] = Treedweller Owlfriend 0003 <gen>
Set Spawns[2] = Young Treedweller 0006 <gen>
Set Spawns[3] = Young Treedweller 0007 <gen>
Set SpawnsLocation[1] = (Position of Spawns[1])
Set SpawnsLocation[2] = (Position of Spawns[2])
Set SpawnsLocation[3] = (Position of Spawns[3])
Set SpawnType[1] = (Unit-type of Spawns[1])
Set SpawnType[2] = (Unit-type of Spawns[2])
Set SpawnType[3] = (Unit-type of Spawns[3])
Spawn System
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 500, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Spawns[(Integer A)] is dead) Equal to True
Then - Actions
Unit - Create 1 SpawnType[(Integer A)] for Neutral Hostile at SpawnsLocation[(Integer A)] facing Default building facing degrees
Set Spawns[(Integer A)] = (Last created unit)
Else - Actions
Do nothing |
