• 🏆 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!

[Trigger] The best way to remove unit from the game?

Status
Not open for further replies.
Level 8
Joined
Sep 24, 2007
Messages
300
I use Remove (unit) action now, but something strange happens in-game.

I can see health bars of dummies, which should already removed (so they obviously are 't).


What's the most sure way that unit will dissapear?
 
sec I'll make you a trigger, just tell me the event/condition.

Here:

  • RemoveUnits
    • Events
    • Conditions
    • Actions
      • Set TempLoc01 = (Center of (Playable map area))
      • Set GroupVar = (Units within 50000.00 of TempLoc01)
      • Unit Group - Pick every unit in GroupVar and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
          • Custom script: call DestroyGroup (udg_GroupVar)
      • Custom script: call RemoveLocation(udg_TempLoc01)
 
Level 8
Joined
Sep 24, 2007
Messages
300
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Ability being cast) Equal to Hidden stomp
    • Then - Actions
      • Set HiddenStompLOC = (Target point of ability being cast)
      • Unit - Create 1 hiddenstomp for (Owner of (Casting unit)) at HiddenStompLOC facing Default building facing (270.0) degrees
      • Set HiddenStompDummy = (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Hidden stomp for (Casting unit)) Equal to 1
        • Then - Actions
          • Unit - Set level of Hidden stomp dummy for HiddenStompDummy to 1
          • Unit - Order HiddenStompDummy to Orc Tauren Chieftain - War Stomp
          • Wait 1.00 seconds
          • Unit - Remove HiddenStompDummy from the game
        • Else - Actions
event=Unit begins casting ability

so should I try with generic expiration timer?
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Ability being cast) Equal to Hidden stomp
    • Then - Actions
      • Set HiddenStompLOC = (Target point of ability being cast)
      • Unit - Create 1 hiddenstomp for (Owner of (Casting unit)) at HiddenStompLOC facing Default building facing (270.0) degrees
      • Set HiddenStompDummy = (Last created unit)
      • Unit - Set level of Hidden stomp dummy for HiddenStompDummy to (Level of (Hidden stomp) for (triggering unit))
      • Unit - Order HiddenStompDummy to Orc Tauren Chieftain - War Stomp
      • Unit - Add a 1.00 second generic expiration timer to HiddenStompDummy
      • Custom script: call RemoveLocation(udg_HiddenStompLOC)
Make it this way... it will be a lot better and you dont have to worry about the level of hidden stomp any more ;)
 
Level 8
Joined
Sep 24, 2007
Messages
300
ok, expiration timer works ok, but I hear Peasant's death sound :/

I removed the death animation from the dummy, but there is no sound category for death sound. How to remove this?

Also, at this point, I want to ask another question (because I don't want to start a new topic just for this).

I added silence ability to one of the items, but when I use the ability, there is no cooldown animation on the item. Cooldown exists (it says spell is not ready yet) but there is no cooldown animation (that grey thing that counts down the cooldown). Can the problem be in item's icon, or maybe in cooldown group?
 
Status
Not open for further replies.
Top