- Joined
- Aug 16, 2007
- Messages
- 884
Hello. I tried to create a Creep Respawn system. And now, I want to know if this system will work 100% through a couple of hours game-play.
Here are the triggers:
Well, will this work?
Here are the triggers:
-
CreepRespawnInitalization
-
Events
- Map initialization
- Conditions
-
Actions
- Set CreepGroup = (Units owned by Player 12 (Brown))
-
Unit Group - Pick every unit in CreepGroup and do (Actions)
-
Loop - Actions
- Set CreepID = (CreepID + 1)
- Set CreepUnitType[CreepID] = (Unit-type of (Picked unit))
- Set CreepRespawnTimer[CreepID] = 0
- Set CreepPosition[CreepID] = (Position of (Picked unit))
- Unit - Set the custom value of (Picked unit) to CreepID
-
Loop - Actions
- Custom script: call DestroyGroup(udg_CreepGroup)
-
Events
-
CreepDies
-
Events
- Unit - A unit Dies
-
Conditions
- (Owner of (Triggering unit)) Equal to Player 12 (Brown)
- ((Triggering unit) is Summoned) Equal to False
-
Actions
- Set CreepRespawnTimer[(Custom value of (Triggering unit))] = 30
-
Events
-
CreepRevive
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- Set CreepGroup = (Units owned by Player 12 (Brown))
-
Unit Group - Pick every unit in CreepGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CreepRespawnTimer[(Custom value of (Picked unit))] Greater than or equal to 1
-
Then - Actions
- Set CreepRespawnTimer[(Custom value of (Picked unit))] = (CreepRespawnTimer[(Custom value of (Picked unit))] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CreepRespawnTimer[(Custom value of (Picked unit))] Equal to 0
-
Then - Actions
- Set CreepRespawnTimer[(Custom value of (Picked unit))] = -5
- Unit - Create 1 CreepUnitType[(Custom value of (Picked unit))] for Player 12 (Brown) at CreepPosition[(Custom value of (Picked unit))] facing Default building facing degrees
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_CreepGroup)
-
Events
Well, will this work?