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

[Trigger] wood into planks

Status
Not open for further replies.
Level 4
Joined
Jun 8, 2008
Messages
87
this trigger is supposed to make so that evry time a unit buys a saw. one piece of lumber in his inventory will turn into a plank. if he havent got any lumber. he will get his 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
can anybody see anything? ^^ the trigger didnt even start at all
 
Im gonna need to see more of the triggers, if this is all then it cant run because of Temp_boolean always equals false because the trigger cant start. Make sure Temp_Boolean starts on false.

If you trigger did work you would have a problem too. It would be free. you didnt put Player - Add 2 to (Owner of (Buying unit)) Current gold in the else actions so it would give it to him no matter what.
 
Status
Not open for further replies.
Top