• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Simple Item Drop Trigger Question

Status
Not open for further replies.
Okay, here is my trigger:

  • Drop
    • Events
      • Player - Player 1 (Red) types a chat message containing -drop as An exact match
      • Player - Player 2 (Blue) types a chat message containing -drop as An exact match
      • Player - Player 3 (Teal) types a chat message containing -drop as An exact match
      • Player - Player 4 (Purple) types a chat message containing -drop as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -drop as An exact match
      • Player - Player 6 (Orange) types a chat message containing -drop as An exact match
      • Player - Player 7 (Green) types a chat message containing -drop as An exact match
      • Player - Player 8 (Pink) types a chat message containing -drop as An exact match
      • Player - Player 9 (Gray) types a chat message containing -drop as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -drop as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -drop as An exact match
      • Player - Player 12 (Brown) types a chat message containing -drop as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Multiple ConditionsOr - Any (Conditions) are true
                • Conditions
                  • ((Picked unit) is A Hero) Equal to (==) True
                  • ((Picked unit) is A ground unit) Equal to (==) True
            • Then - Actions
              • Set tempPoint = (Position of (Picked unit))
                • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
                  • Loop - Actions
                    • Hero - Drop the item from slot (Integer A) of (Picked unit)
              • Custom script: call RemoveLocation(udg_tempPoint)
            • Else - Actions

Now I need to know how to make it stop the hero, drop one by one, and play a sound as each item drops, then unfreeze hero.

If you can anwer I will give you +REP.
 
  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hashtable = (Last created hashtable)
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • Trigger - Add to Drop <gen> the event (Player - Player (IntegerA) types a chat message containing -drop as An exact match)
  • Drop
  • Events
  • 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
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are true
              • ((Picked unit) is A Hero) Equal to True
              • ((Picked unit) is A ground unit) Equal to True
    • Then - Actions
      • Unit Group - Add (Picked unit) to SlotGroup
      • Hashtable - Save 0 as (Key(slotcount)) of (Key(Picked unit)) in Hashtable
      • Trigger - Turn on Drop2 <gen>
  • Drop2
  • Events
    • Time - Every 0.50 seconds of game-time
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (SlotGroup is empty) Equal to True
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
        • Unit Group - Pick every unit in (SlotGroup) and do (Actions)
          • Loop - Actions
            • Set Count = (Load (Key(slotcount)) of (Key(Picked unit)) in Hashtable)
            • If (All conditions are true) then do (Actions) else do (Actions)
              • If - Conditions
                • (Count) Less than or Equal to 6
              • Then - Actions
                • Hashtable - Save (Count + 1) as (Key(slotcount)) of (Key(Picked unit)) in Hashtable
                • Hero - Drop the item from slot Count of (Picked unit)
                • Sound - Play sound at 100% volume, attached to (Picked unit)
              • Else - Actions
                • Unit Group - Remove (Picked unit) from SlotGroup
                • Unit - Unpause (Picked unit)
                • Hashtable - Clear all child hashtables of (Key(Picked unit)) in Hashtable
 
Last edited:
Status
Not open for further replies.
Top