• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] why doesnt this work?

Status
Not open for further replies.
Level 4
Joined
Jun 8, 2008
Messages
87
this trigger does so that whenever you buy a saw. 1 piece of wood from your inventory turns into a plank. If you havent got any wood it gives your money back
  • wood into planks
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Saw
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Boolean Equal to False) and ((Item-type of (Item carried by (Buying unit) in slot (Integer A))) Equal to Piece of Wood)
            • Then - Actions
              • Unit - Pause (Buying unit)
              • Animation - Change (Selling unit)'s animation speed to 300.00% of its original speed
              • Neutral Building - Remove Saw from (Selling unit)
              • Wait 6.00 seconds
              • Neutral Building - Add Saw to (Triggering unit) with 1 in stock and a max stock of 1
              • Item - Remove (Item carried by (Buying unit) in slot (Integer A))
              • Hero - Create Plank and give it to (Buying unit)
              • Set Temp_Boolean = True
              • Player - Add -2 to (Owner of (Buying unit)) Current gold
              • Unit - Unpause (Buying unit)
              • If ((Integer A) Equal to 6) then do (Set Temp_Boolean = False) else do (Do nothing)
            • Else - Actions
      • Player - Add 2 to (Owner of (Buying unit)) Current gold
i see no problems whit it. anybody? ^^
 
it should make any impact, the unit already has the wood in the inventory from the start
 
Use this as events and conditions:

  • Events
    • Unit - A unit Sells a unit
  • Conditions
    • (Item-type of (Sold Item)) Equal to (==) Saw
    • ((Buying unit) has an item of type Piece of Wood) Equal to (==) True
This way in the actions part you will not have to make a loop, check different slots.
I will not comment the actions you posted.

And FFS do not spam multiple threads about the same thing.
 
sorry the multiple tread thing was an error ^^ but mine should still work right? why didnt it work?
 
Status
Not open for further replies.
Back
Top