Hello, I am trying to make a unit revival system for each player. There is a shop which sells "companions" which each hero may have 1 of at a time. When the companion dies, it is revived after 5 seconds. However the text message and SPX is displayed, but no unit is created. Here is my trigger
-
Revive Companion
-
Events
- Unit - A unit Dies
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Dying unit)) Equal to Forest Troll High Priest
- (Unit-type of (Dying unit)) Equal to Red Dragon
- (Unit-type of (Dying unit)) Equal to Goblin Shredder
- (Unit-type of (Dying unit)) Equal to Goblin Zeppelin
- (Unit-type of (Dying unit)) Equal to Bronze Dragon
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Set Companion_Owner[(Player number of (Owner of (Dying unit)))] = (Owner of (Dying unit))
- Game - Display to (All players matching ((Matching player) Equal to (Owner of (Dying unit)))) for 5.00 seconds the text: Your Companion will...
- Wait 5.00 seconds
- Unit - Create 1 (Unit-type of (Dying unit)) for Companion_Owner[(Player number of (Owner of (Dying unit)))] at Revive_Companion facing Default building facing degrees
- Special Effect - Create a special effect at Revive_Companion using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
- Special Effect - Destroy (Last created special effect)
-
Events