Creep Revival System Initialization
Events
Map initialization
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
Loop - Actions
Set Integer = (Integer + 1)
Unit - Set the custom value of (Picked unit) to Integer
Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())
I think its because of a leak but i really dont know. One area of my map, creeps spawn uncontrollably.
Ive been using this same trigger in different maps and always had problems with it. If anyone gets a chance could you look over it and see if it looks ok?
These are my triggers.
Trigger:
- Creep Revival System Initialization
- Events
- Map initialization
- Conditions
- Actions
- Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
- Loop - Actions
- Set Integer = (Integer + 1)
- Unit - Set the custom value of (Picked unit) to Integer
- Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
- Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())
Trigger:
- Revive Creeps
- Events
- Unit - A unit Dies
- Conditions
- ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True)
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- CreepRespawnTime Greater than 0.00
- Then - Actions
- Wait CreepRespawnTime game-time seconds
- Unit - Create 1 (Random level CreepLevel creep unit-type) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])) facing (Random angle) degrees
- Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
- Else - Actions
- Wait 30.00 seconds
- Unit - Create 1 (Random level CreepLevel creep unit-type) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])) facing (Random angle) degrees
- Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
Hey im using this system and its causin crazy stuff too happen. If anyone could help id appreciate it.
Add a point variable array named tempPoint
Can then be made leakless like this:
Code:Revive Creeps 1 by 1 Events Unit - A unit Dies Conditions ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True) Actions Wait 5.00 game-time seconds Set tempPoint[1] = (Center of (Entire map)) Set tempPoint[2] = tempPoint[1] offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))]) Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at tempPoint[2] facing (Random angle) degrees Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit)) Custom Script: call RemoveLocation(udg_tempPoint[1]) Custom Script: call RemoveLocation(udg_tempPoint[2])
Assuming Center of Entire map doesn't leak and you'd want the trigger leakless
I created trigger same with Magentix but creeps revive wrong location with default location. After that creeps still revive at wrong location.
I also try with Tinki3 code but the result is the same with above.
What should i do now ?
Actions
Wait 2.00 game-time seconds
Set point = (Point(Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))]))
Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at point facing Default building facing degrees
Uh. I think you ought to post in the help zone to get more views and response.Yahooooooo, it's work like charm. Thanks in advanced.
Do you have email or skype ? I want to add you.
Another problem, how to make creep revive stronger after they have been revived ?
Example: Increase hp 10%, increase damg 10%, increase armor 10% .. each time they revive.
Why i set WAIT less than 10 second, it's working. But if i set WAIT =300 or 600 second, it's not work ?