• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

MS and MA commands

Status
Not open for further replies.
Level 5
Joined
Nov 29, 2007
Messages
106
Hello
Can someone tell me how to do MS and MA Commands??
MS:
When any of player (for red and green it not work (computers) type -ms or -movespeed it shows his hero movement speed.

MA:
When any of player (for red and green it not work (computers) type -ma or -matchup it shows his enemies picked heroes.
 
Level 30
Joined
Jan 31, 2010
Messages
3,552
About the MS:

  • Melee Initialization
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Set UnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
      • Loop - Actions
      • Game - Display to (Player group((Triggering player))) the text: ((Name of (Picked unit)) + (movement speed is + (String((Current movement speed of (Picked unit)), 4, 3)))))
 
Level 5
Joined
Nov 29, 2007
Messages
106
About -ma : I made simply trigger but this not work (when saving map got error and need to turn off this trigger):
  • Events
    • Player - Player 2 (Blue) types a chat message containing -ma as Ideal compliance
    • Player - Player 3 (Teal) types a chat message containing -ma as Ideal compliance
    • Player - Player 4 (Purple) types a chat message containing -ma as Ideal compliance
    • Player - Player 5 (Yellow) types a chat message containing -ma as Ideal compliance
    • Player - Player 6 (Orange) types a chat message containing -ma as Ideal compliance
    • Player - Player 8 (Pink) types a chat message containing -ma as Ideal compliance
    • Player - Player 9 (Gray) types a chat message containing -ma as Ideal compliance
    • Player - Player 10 (Lightblue) types a chat message containing -ma as Ideal compliance
    • Player - Player 11 (Darkgreen) types a chat message containing -ma as Ideal compliance
    • Player - Player 12 (Brown) types a chat message containing -ma as Ideal compliance
    • Player - Player 2 (Blue) types a chat message containing -matchup as Ideal compliance
    • Player - Player 3 (Teal) types a chat message containing -matchup as Ideal compliance
    • Player - Player 4 (Purple) types a chat message containing -matchup as Ideal compliance
    • Player - Player 5 (Yellow) types a chat message containing -matchup as Ideal compliance
    • Player - Player 6 (Orange) types a chat message containing -matchup as Ideal compliance
    • Player - Player 8 (Pink) types a chat message containing -matchup as Ideal compliance
    • Player - Player 9 (Gray) types a chat message containing -matchup as Ideal compliance
    • Player - Player 10 (Lightblue) types a chat message containing -matchup as Ideal compliance
    • Player - Player 11 (Darkgreen) types a chat message containing -matchup as Ideal compliance
    • Player - Player 12 (Brown) types a chat message containing -matchup as Ideal compliance
  • Actions
    • Set UnitGroup = (Units in (Playable map area) matching (((Matching unit) is Bohater) Equal to True))
    • Unit Group - Pick every unit in UnitGroup and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Owner of (Picked unit)) is an enemy of (Triggering player)) Equal to True
          • Then - Actions
            • Game - Display to (Player group((Triggering player))) the text: (PlayerNames[(Player number of (Owner of (Picked unit)))] + ( controls + (Name of (Picked unit))))
          • Else - Actions
BTW. Apheraz your movement speed system not work, it says after -ms : Paladin movement speed is 0.0000
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Here you go...

  • Commands
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
      • Player - Player 2 (Blue) types a chat message containing - as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (String((Substring((Entered chat string), 2, 3))) as Lower case) Equal to ms
        • Then - Actions
          • Set Force = (Player group((Triggering player)))
          • -------- Integer to real -> Real to integer because those 3 digits behind the comma aren't really useful either way. --------
          • Game - Display to (All players) for 7.00 seconds the text: (|c009632C8Movement Speed:|r |c006464C8 + ((String((Integer((Current movement speed of Hero[(Player number of (Triggering player))]))))) + |r))
          • Custom script: call DestroyForce(udg_Force)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (String((Substring((Entered chat string), 2, 3))) as Lower case) Equal to ma
            • Then - Actions
              • Set Force = (All enemies of (Triggering player))
              • Player Group - Pick every player in Force and do (Actions)
                • Loop - Actions
                  • Game - Display to (All players) for 7.00 seconds the text: (|c009632C8Player + ((String((Player number of (Picked player)))) + (:|R + (Name of Hero[(Player number of (Picked player))]))))
              • Custom script: call DestroyForce(udg_Force)
            • Else - Actions
Test-map attached.
 

Attachments

  • Commands (req).w3x
    17.6 KB · Views: 88
Status
Not open for further replies.
Top