• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Repick trigger

Status
Not open for further replies.
Level 10
Joined
Nov 3, 2009
Messages
686
Haha!

I'm really sorry and this is my last thread today :D:

So I have problem, I want to make that when player writes repick and IF HE HAS AN ITEM(FLAG) with him it would be dropped on the ground before repicking.

This is my trigger which doesn't work:
  • Repick Sky
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) has Flag_Horde) Equal to True
    • Actions
      • Hero - Drop Flag_Horde from (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Repick[(Player number of (Triggering player))] Equal to False
        • Then - Actions
          • Player - Add 250 to (Triggering player) Current gold
          • Set Repick[(Player number of (Triggering player))] = True
          • Set repickgroup = (Units owned by (Triggering player))
          • Unit Group - Pick every unit in repickgroup and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
              • Unit - Create 1 Circle of Power for (Triggering player) at (Random point in repicksky <gen>) facing Default building facing degrees
              • Camera - Pan camera for (Triggering player) to (Center of repicksky <gen>) over 0.00 seconds
          • Custom script: call DestroyGroup(udg_repickgroup)
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: You can only repick...
Once again, sorry for spamming threads! :D:ogre_datass:
 
Level 18
Joined
May 11, 2012
Messages
2,103
There is not triggering unit in the event
Your trigger should look like this:

  • Melee Initialization
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
      • Player - Player 2 (Blue) types a chat message containing -repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -repick as An exact match
      • Player - Player 4 (Purple) types a chat message containing -repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) matching Matching unit ia a Hero Equal to true and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked Unit) has Flag_Horde) Equal to True
            • Then - Actions
              • Hero - Drop (Item carried by (Picked unit) of type Flag_Horde) from (Picked unit)
            • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Repick[(Player number of (Triggering player))] Equal to False
          • Then - Actions
            • Player - Add 250 to (Triggering player) Current gold
            • Set Repick[(Player number of (Triggering player))] = True
            • Custom script: set bj_wantDestroyGroup = true
            • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
              • Loop - Actions
                • Unit - Remove (Picked unit) from the game
                • Unit - Create 1 Circle of Power for (Triggering player) at (Random point in repicksky <gen>) facing Default building facing degrees
                • Camera - Pan camera for (Triggering player) to (Center of repicksky <gen>) over 0.00 seconds
          • Else - Actions
            • Game - Display to (Player group((Triggering player))) the text: You can only repick...
 
Last edited:
Level 18
Joined
May 11, 2012
Messages
2,103
did the hero even had the flag? the first IfTHenElse will run only if the hero has that item.
Also, item must have a model so item can be seen when dropped on ground and set the Stats - Can be Dropped to true

Sorry, my mistake. I edited the trigger post. Now it should work
The mistake was in here:
  • Hero - Drop (Picked item) from (Picked unit)
Correctly:
  • Hero - Drop (Item carried by (Picked unit) of type Flag_Horde) from (Picked unit)
 
Status
Not open for further replies.
Top