I'm making a recipe in my game that requires 3 of the same item (the item is automatically given to the player when the 3 items are acquired without requiring the player to purchase the recipe).
I wasn't quite sure how to go about it, heres what I got:
I wasn't quite sure how to go about it, heres what I got:
Trigger:
- Grimoire Creation
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to |c00FF7F00Moonglow Lantern|r
- 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
- (Item carried by (Hero manipulating item) in slot (Integer A)) Equal to (Item carried by (Hero manipulating item) of type |c00FF7F00Moonglow Lantern|r)
- Then - Actions
- Set LanternCheck_Int = (LanternCheck_Int + 1)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- LanternCheck_Int Equal to 3
- Then - Actions
- Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIem\AIemTarget.mdl
- For each (Integer A) from 1 to 3, do (Actions)
- Loop - Actions
- Item - Remove (Item carried by (Hero manipulating item) of type |c00FF7F00Moonglow Lantern|r)
- Loop - Actions
- Hero - Create |c00FF7F00Grimoire of Souls|r and give it to (Hero manipulating item)
- Else - Actions
- If - Conditions
- Set LanternCheck_Int = 0
- For each (Integer A) from 1 to 6, do (Actions)
- Events