This is a recipe trigger for stackable items. I'm not sure if it leaks or anything, it's for a single player map if that means anything.
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Smelt Bronze
- ((Triggering unit) has an item of type Copper Bar) Equal to True
- ((Triggering unit) has an item of type Tin Bar) Equal to True
-
Then - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
For each (Integer B) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Copper Bar
- (Item-type of (Item carried by (Triggering unit) in slot (Integer B))) Equal to Tin Bar
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) Equal to 1
- (Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) Equal to 1
-
Then - Actions
- Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
- Item - Remove (Item carried by (Triggering unit) in slot (Integer B))
- Item - Create Bronze Bar at (Position of (Triggering unit))
- Item - Set charges remaining in (Last created item) to 2
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) Equal to 1
-
Then - Actions
- Item - Remove (Item carried by (Triggering unit) in slot (Integer B))
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer A)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) - 1)
- Item - Create Bronze Bar at (Position of (Triggering unit))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) Equal to 1
-
Then - Actions
- Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer B)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) - 1)
- Item - Create Bronze Bar at (Position of (Triggering unit))
- Item - Set charges remaining in (Last created item) to 2
-
Else - Actions
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer A)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) - 1)
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer B)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) - 1)
- Item - Create Bronze Bar at (Position of (Triggering unit))
- Item - Set charges remaining in (Last created item) to 2
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer B) from 1 to 6, do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Else - Actions
- Floating Text - Create floating text that reads Incorrect materials. above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 10.00%), and 0.00% transparency
- Set tmpFloat = (Last created floating text)
- Floating Text - Set the velocity of tmpFloat to 120.00 towards 270.00 degrees
- Floating Text - Change tmpFloat: Disable permanence
- Floating Text - Change the lifespan of tmpFloat to 2.00 seconds
- Floating Text - Change the fading age of tmpFloat to 0.00 seconds
-
If - Conditions