NoxMortus
All Along the Watchtower
- Reaction score
- 104
Hi, what i wanna do is limit the heroes to only being able to hold 1 shield in his inventory at a time, so i made this trigger (with thanks to people who helped in other thread)
this disallows there hero that is already holding a shield to pick another up, but it allows the hero to pick up the same shield, so he can carry 2 'medium iron shields'
but not 1 'wooden small shield' and 1 'wood tower shield'.. so what i want is to disallow the hero from being able to pick up 2 of the same items (shields) any ideas?
Code:
OneShieldOnly
Events
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Elven tower shield
(Item-type of (Item being manipulated)) Equal to Fire Enchanted Shield
(Item-type of (Item being manipulated)) Equal to Flimsy wooden shield
(Item-type of (Item being manipulated)) Equal to Medium metal shield
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 1))
Then - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
((Triggering unit) has an item of type Elven tower shield) Equal to True
((Triggering unit) has an item of type Fire Enchanted Shield) Equal to True
((Triggering unit) has an item of type Flimsy wooden shield) Equal to True
((Triggering unit) has an item of type Medium metal shield) Equal to True
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: You already have a ...
Else - Actions
this disallows there hero that is already holding a shield to pick another up, but it allows the hero to pick up the same shield, so he can carry 2 'medium iron shields'
but not 1 'wooden small shield' and 1 'wood tower shield'.. so what i want is to disallow the hero from being able to pick up 2 of the same items (shields) any ideas?


