• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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