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

how to make custom commands?

Status
Not open for further replies.
Level 6
Joined
Sep 27, 2008
Messages
258
Like this?

  • KIll
    • Events
      • Player - Player 1 (Red) types a chat message containing -kill as An exact match
    • Conditions
    • Actions
      • Unit - Kill Archmage 0000 <gen>
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
You cant use triggering unit as there is no triggering unit. I Suggest that you either use a Unitvariable to reference each hero as it is picked to each seperate player or to use

Pick every unit in owner by trigger player
Pick every unit matching condition Bolean=to hero true
Kill unit
:p

The first option is preferrable as it allows for better referencing for custom abillities as well.
 
Level 6
Joined
Sep 27, 2008
Messages
258
you can't use triggering unit since there is no unit triggering it, the player is not the unit so you could make different one for each hero like

-kill Pally
-kill fire mage

or you could use a hashtable and save the hero to the player so that when you type -kill hero you make it load that player's hero from the hashtable
 
Level 4
Joined
Jun 17, 2011
Messages
64
you can't use triggering unit since there is no unit triggering it, the player is not the unit so you could make different one for each hero like

-kill Pally
-kill fire mage

or you could use a hashtable and save the hero to the player so that when you type -kill hero you make it load that player's hero from the hashtable

how do i make a hashtable?
 
Level 6
Joined
Sep 27, 2008
Messages
258
Idk how to do it unless you select the hero like from a tavern or something, but idk how to save it if you start out with the hero so you might want to try what brambleclaw said or just make one for ever hero or just wait for someone eles who knows more too come by
 
Status
Not open for further replies.
Top