- Joined
- Jan 9, 2016
- Messages
- 1,487
Hey there. I've been making a trigger that creates another unit upon construction of a specific tower. The unit will never die (has reincarnation 0 cd) unless the tower itself is destroyed. Here's the trigger:
Any help will be largely credited since I've been working on this for quite a while now and it still baffles me. I'm quite sure something in this is leaking the trigger.
-
Tower Revenant
-
Events
- Unit - A unit Finishes construction
-
Conditions
- (Unit-type of (Triggering unit)) Equal to (==) Revenant Tower
-
Actions
- Set Tower_Building = (Triggering unit)
- Set Tower_TempPoint = (Position of Tower_Building)
- Set Tower_Value = (Custom value of Tower_Building)
- Unit - Create 1 Castle Revenant for (Owner of Tower_Building) at Tower_TempPoint facing Default building facing (270.0) degrees
- Set Tower_Revenant[Tower_Value] = (Last created unit)
- Custom script: call RemoveLocation(udg_Tower_TempPoint)
-
Events
-
Tower Revenant Death
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Dying unit)) Equal to (==) Revenant Tower
-
Actions
- Set Tower_Building = (Triggering unit)
- Set Tower_TempPoint = (Position of Tower_Building)
- Set Tower_Value = (Custom value of Tower_Building)
- Unit - Remove Revenant Revival from Tower_Revenant[Tower_Value]
- Unit - Add a 0.01 second Generic expiration timer to Tower_Revenant[Tower_Value]
- Custom script: call RemoveLocation(udg_Tower_TempPoint)
-
Events