ianu74
New Member
- Reaction score
- 8
I placed this triggers on my map, yet some mobs don't respawn.
Some of the units just die and never respawn. Why?
Code:
Respawn Initial
Events
Map initialization
Conditions
Actions
Set TmpInteger = 1
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
Loop - Actions
Set CreepPosition[TmpInteger] = (Position of (Picked unit))
Set graveyardunits[TmpInteger] = (Unit-type of (Picked unit))
Unit - Set the custom value of (Picked unit) to TmpInteger
Set TmpInteger = (TmpInteger + 1)
Code:
Respawn
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
((Dying unit) is Summoned) Equal to False
(Custom value of (Dying unit)) Greater than or equal to 1
Actions
Wait (Random real number between 30.00 and 40.00) seconds
Unit - Create 1 graveyardunits[(Custom value of (Dying unit))] for Neutral Hostile at CreepPosition[(Custom value of (Dying unit))] facing (Random angle) degrees
Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))