Im making a RPG map and I need to make every unit, to respawn after 10-15 secs after death, at the initial position it was setted, facing doesnt matter.
I tried this, but for some odd reasons, some units doesnt respawn..
I tried this, but for some odd reasons, some units doesnt respawn..
-
Respawn
-
Events
- Map initialization
- Conditions
-
Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
-
Loop - Actions
- Set Integer = (Integer + 1)
- Set Creep_Loc[Integer] = (Position of (Picked unit))
- Set Creep_Face_Ang[Integer] = (Facing of (Picked unit))
- Unit - Set the custom value of (Picked unit) to Integer
-
Loop - Actions
-
Events
-
Respawn Copy
-
Events
- Unit - A unit Dies
-
Conditions
- (Owner of (Triggering unit)) Equal to Neutral Hostile
-
Actions
- Wait (Random real number between 10.00 and 12.00) seconds
- Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at Creep_Loc[(Custom value of (Triggering unit))] facing Creep_Face_Ang[(Custom value of (Triggering unit))] degrees
- Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
-
Events