• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Budding Seeds

Status
Not open for further replies.
Level 3
Joined
Mar 15, 2020
Messages
48
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:
  • 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)
    • Custom script: call RemoveLocation (udg_tempPoint)
Right now what this does is pick ANY unit in the targeted area and replaces them with Treants, even the hero himself. How do I remedy this to only target corpses?
 
Status
Not open for further replies.
Top