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

Movespeed trigger

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
  • Movespeed
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
      • Player - Player 2 (Blue) types a chat message containing -ms as An exact match
      • Player - Player 3 (Teal) types a chat message containing -ms as An exact match
      • Player - Player 4 (Purple) types a chat message containing -ms as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -ms as An exact match
      • Player - Player 6 (Orange) types a chat message containing -ms as An exact match
      • Player - Player 7 (Green) types a chat message containing -ms as An exact match
      • Player - Player 8 (Pink) types a chat message containing -ms as An exact match
      • Player - Player 9 (Gray) types a chat message containing -ms as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Unit Group - Add all units of (Units currently selected by (Triggering player)) to movespeed_group
      • For each (Integer A) from 1 to (Number of units in movespeed_group), do (Actions)
        • Loop - Actions
          • Set movespeed_unit = (Random unit from movespeed_group)
          • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) the text: (Current movespeed of + ((Name of movespeed_unit) + (: + (String((Integer((Current movement speed of movespeed_unit))))))))
          • Unit Group - Remove movespeed_unit from movespeed_group
          • Custom script: set udg_movespeed_unit = null
      • Unit Group - Remove all units of movespeed_group from movespeed_group

I got this trigger to do what I want in-game, just need you to tell me if it's clean and will it leak?


Here is a picture of what it does:

2e367is.jpg
 
Level 8
Joined
Apr 30, 2009
Messages
338
Attached map.

If you want to comment on the trigger that adds spellpower from INT that would be cool too. I know I should use custom script for spells but I'm still learning it and making it all in GUI first helps me.

Also does anyone know where I can find the code for Phantom Assassin(DotA)'s Stifling Dagger spell, or any projectile spell that doesn't stun but has a travel time?
 

Attachments

  • test.w3x
    22.1 KB · Views: 50
Level 8
Joined
Apr 30, 2009
Messages
338
1. You don't need to null global variables (they'll be set to something anyways)
2. You have to destroy global handles such as groups with DestroyGroup( udg_yourGroup ) after you're done with it.


global handles are just the variables assigned by the game like Triggering Player, Triggering Unit, Units Selected, etc?
 
Status
Not open for further replies.
Top