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

Strange problem with my -ms

Status
Not open for further replies.
Level 3
Joined
Dec 14, 2008
Messages
41
What is wrong with this trigger, if i execute it several times the unit selected can not be controled byt the player, and if i execute several times more it can.

  • MS
    • Events
      • 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 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
      • Player - Player 11 (Dark Green) types a chat message containing -ms as An exact match
      • Player - Player 12 (Brown) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Set TempUnitGroup = (Units currently selected by (Triggering player))
      • Unit Group - Pick every unit in TempUnitGroup and do (Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: (String((Integer((Current movement speed of (Picked unit)))))))
      • Custom script: call DestroyGroup(udg_TempUnitGroup)
 
Level 13
Joined
Sep 29, 2008
Messages
671
I tried this and it works

  • Test
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: (String((Integer((Current movement speed of (Picked unit))))))
 
Level 10
Joined
Jul 31, 2008
Messages
477
You could use this one, it works perfectly fine for me:

  • ShowMovementspeed
    • 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
    • Conditions
    • Actions
      • Set UnitGroup = (Units owned by (Triggering player))
      • 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
              • ((Picked unit) is selected by (Triggering player)) Equal to True
            • Then - Actions
              • Set MovespeedCheckUnit = (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Set PlayerGroup = (Player group((Triggering player)))
      • Game - Display to PlayerGroup for 10.00 seconds the text: (|cffffcc00Your current selected units movementspeed|r: + (String((Integer((Current movement speed of MovespeedCheckUnit))))))
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Set MovespeedCheckUnit = No unit
Edit: Nerovesper was the minute before me there =D
 
Status
Not open for further replies.
Top