• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Remove channeling dummys

Status
Not open for further replies.
Level 7
Joined
May 11, 2010
Messages
278
So, i have a unit that casts an ability based on Death and Decay, and i have triggered the ability aswell, to make a dummy cast a non damaging earthquake for the effect and the slow.
but i want to trigger that when the unit stops channeling, the dummy is removed.
that works.
but when multiple units use the ability at same time and one disrupt it, i get problems. Can someone help me with my triggering?
and please, no jass if posssible.

  • Shattering
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Shattering
    • Actions
      • Set temp_point = (Position of (Casting unit))
      • Set temp_point_1 = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at temp_point facing Default building facing degrees
      • Unit - Add a 11.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Earthquake temp_point_1
      • Trigger - Add to shattering interruption <gen> the event (Unit - (Casting unit) Stops casting an ability)
      • Trigger - Turn on shattering interruption <gen>
      • Custom script: call RemoveLocation (udg_temp_point)
      • Custom script: call RemoveLocation (udg_temp_point_1)
(Trigger 2 is initially off)
  • shattering interruption
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Dummy
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • Trigger - Turn off (This trigger)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Use generic unit event, unit stops casting an ability.

  • Untitled Trigger 046
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Starfall
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: stop
Use either a unit indexer (Bribe's unit indexer) or a hashtable to bind the dummy to the caster.

Here's a very simple example: http://www.hiveworkshop.com/forums/pastebin.php?id=hnp2rd

I didn't even remove leaks.
 
Status
Not open for further replies.
Top