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

[Trigger] item order issue

Status
Not open for further replies.
Level 3
Joined
Feb 7, 2011
Messages
29
Hello,

I'm new to triggering so take it easy on me please ><, I'm a bit stuck with this trigger
  • Farm income Copy
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set FIUG = (Units in (Playable map area) owned by Player 1 (Red))
      • Unit Group - Pick every unit in FIUG and do (Actions)
        • Loop - Actions
          • Set BIUG = (Picked unit)
          • Set FIUG = (Units in (Playable map area) owned by Player 1 (Red))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of BIUG) Equal to Farm
            • Then - Actions
              • Set FBP = (Position of BIUG)
              • Item - Create Bread at FBP
              • Set BIP = (Last created item)
              • Unit - Create 1 item Dummy for Player 1 (Red) at FBP facing Default building facing degrees
              • Set BIUP = (Last created unit)
              • Unit - Order BIUP to Right-Click BIP
              • Wait 0.50 game-time seconds
              • Unit - Order BIUP to give BIP to BIUG
            • Else - Actions
The dummy units spawn and they pick up the item, but they do not give the item to the Farm as they are supposed too[and yes i put inventory option on it] and I am not sure if I should even put the wait time there.

Regards.
- zheavy -
 
Level 3
Joined
Feb 7, 2011
Messages
29
Hello,

I understand u wanted me to remove the wait action, so i did but it still isn't working.

Regards.
- zheavy -
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
You could do something like
  • Farm income
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 1 (Red)) and ((Unit-type of (Matching unit)) Equal to Farm))) and do (Actions)
        • Loop - Actions
          • Hero - Create Bread and give it to (Picked unit)
The function
  • Custom script: set bj_wantDestroyGroup = true
just clears the unit group leak.
For more info about leaks,consult this link: http://www.hiveworkshop.com/forums/...torials-279/essentials-tutorial-141191/#Leaks
 
Level 3
Joined
Feb 7, 2011
Messages
29
Hello,

Thank you very much for help, u technically solved my whole map idea;)
Included u in credits;)

And as for the leaks, it's just I am new to triggering and using the custom script to remove them one by one, but thank you for the link, will go through it, that would probably make my work faster then setting so many variables.

Regards.
- zheavy -
 
Status
Not open for further replies.
Top