- Joined
- Sep 27, 2009
- Messages
- 672
Hey guys, I made a trigger that should do this:
I use stack system so some items are based on charges...
-When you have 1 charge of Iron Ore, and you buy Iron Bar(dummy) that costs 5 gold, you will should get 1 Iron Bar.
-And when you have more than 1 Iron Ore and make Iron Bar, it should decrease charges of Iron ore by 1.
-In my map it's working like this:
-When I have 1 Iron ore, and it does the job (removes my item)...
-When I have 2 Iron ores (THIS IS BUG) and buy "dummy" It will make 2 Iron Bars...
-If charges of Iron Ore is 3 or more it will do the job and decrease 1 charge...
But if it's 2 it will make 2 Bars...
Here's Trigger:
I use stack system so some items are based on charges...
-When you have 1 charge of Iron Ore, and you buy Iron Bar(dummy) that costs 5 gold, you will should get 1 Iron Bar.
-And when you have more than 1 Iron Ore and make Iron Bar, it should decrease charges of Iron ore by 1.
-In my map it's working like this:
-When I have 1 Iron ore, and it does the job (removes my item)...
-When I have 2 Iron ores (THIS IS BUG) and buy "dummy" It will make 2 Iron Bars...
-If charges of Iron Ore is 3 or more it will do the job and decrease 1 charge...
But if it's 2 it will make 2 Bars...
Here's Trigger:
-
Iron Bar Make
-

Events
-


Unit - A unit Sells a unit
-
-

Conditions
-


(Unit-type of (Sold unit)) Equal to Iron Bar
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Buying unit) has an item of type Minning Pick) Equal to True
-




(Charges remaining in (Item carried by (Buying unit) of type Iron Ore)) Greater than 1
-
-



Then - Actions
-




Item - Set charges remaining in (Item carried by (Buying unit) of type Iron Ore) to ((Charges remaining in (Item carried by (Buying unit) of type Iron Ore)) - 1)
-




Hero - Create Iron Bar and give it to (Buying unit)
-
-



Else - Actions
-




Player - Add 5 to (Owner of (Buying unit)) Current gold
-
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Buying unit) has an item of type Minning Pick) Equal to True
-




(Charges remaining in (Item carried by (Buying unit) of type Iron Ore)) Less than 2
-
-



Then - Actions
-




Item - Remove (Item carried by (Buying unit) of type Iron Ore)
-




Hero - Create Iron Bar and give it to (Buying unit)
-
-



Else - Actions
-




Player - Add 5 to (Owner of (Buying unit)) Current gold
-
-
-
-

