I've created an ability I'd meant to work like this:
- Target area of effect
- Pick ONLY dead units
- Pick X amount of corpses in area
- Replace corpses with Treants
- Set 30 second timer on said Treants
- Remove corpses
My current triggers for the spell looks like this:
- Target area of effect
- Pick ONLY dead units
- Pick X amount of corpses in area
- Replace corpses with Treants
- Set 30 second timer on said Treants
- Remove corpses
My current triggers for the spell looks like this:
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Budding Seeds (Aros)
-
Actions
- Set VariableSet tempPoint = (Target point of ability being cast)
- Set VariableSet BuddingSeed_Count = (2+((Level of Budding Seeds (Aros) for (Triggering Unit)) / 2))
-
Unit Group - Pick every unit in (Random BuddingSeed_Count units from (Units within 300.00 of tempPoint matching (((Picked unit) is dead) Equal to True).)) and do (Actions)
-
Loop - Actions
- Set VariableSet temp_Point = (Position of (Picked unit))
- Unit - Create 1 Treant for (Owner of (Triggering unit)) at temp_Point facing Default building facing degrees
- Unit - Add a 30.00 second Force Of Nature expiration timer to (Last created unit)
- Animation - Play (Last created unit)'s birth animation
- Animation - Queue (Last created unit)'s stand animation
- Unit - Remove (Picked unit) from the game
- Custom script: call RemoveLocation (udg_temp_Point)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_tempPoint)