- Joined
- May 8, 2010
- Messages
- 150
Heyy,
basically im making a mining system, and when the hero destroys/mines a rock it adds the material into the heroes inventory.. BUTT
if the hero already has this material, it will add a charge.. so it looks like hes carrying more than 1 type of rock.
This is the trigger i've got so far.
+ rep for help as always.
[trigger=trigger]MithrilItem
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Mithril
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Attacking unit) has an item of type Mithril) Equal to True
Then - Actions
Item - Set charges remaining in (Item carried by (Killing unit) of type Mithril) to ((Charges remaining in (Item carried by (Killing unit) of type Mithril)) + 1)
Else - Actions
Hero - Create Mithril and give it to (Killing unit)
[/trigger]
basically im making a mining system, and when the hero destroys/mines a rock it adds the material into the heroes inventory.. BUTT
if the hero already has this material, it will add a charge.. so it looks like hes carrying more than 1 type of rock.
This is the trigger i've got so far.
+ rep for help as always.
[trigger=trigger]MithrilItem
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Mithril
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Attacking unit) has an item of type Mithril) Equal to True
Then - Actions
Item - Set charges remaining in (Item carried by (Killing unit) of type Mithril) to ((Charges remaining in (Item carried by (Killing unit) of type Mithril)) + 1)
Else - Actions
Hero - Create Mithril and give it to (Killing unit)
[/trigger]