• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Items

Status
Not open for further replies.
Level 4
Joined
Jun 4, 2008
Messages
49
I am making a map in which I will use attachments for items(makes it cooler).
Anyway, the problem is that the hero can take up to 6 swords or shields... That makes it look pretty stupid so i put all the shields in one class of items and the swords in another. I used a very simple trigger:

  • Helmet
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Artifact
    • Actions
      • If (((Hero manipulating item) has an item of type (Random level -1 Artifact item-type)) Equal to True) then do (Hero - Drop (Item being manipulated) from (Hero manipulating item)) else do (Do nothing)
but it works only once. After that the hero can take 6 sword or shield again.
If anyone knows how to fix this, or a better way to solve my problem, please tell me and I will give you rep :cute:
 
Last edited:
  • Helmet
    • Events
    • Unit - A unit Acquires an item
    • Conditions
    • (Item-class of (Item being manipulated)) Equal to Artifact
    • Actions
    • If (((Hero manipulating item) has an item of type (Random level -1 Artifact item-type)) Equal to True) then do (Hero - Drop (Item being manipulated) from (Hero manipulating item)) else do (Do nothing)
Any Ideas?
 
Is this the only trigger you're using?

from what I see, this trigger should always drop the item you pick up, as the condition is always valid, because you always pick up an artifact (the item you picked up is in your inventory when the condition is checked). But this doesn't explain why the trigger would only work once.

Also instead of using Hero manipulating item, you can just use triggering unit

Oh crap I just realised, you're using 'random item type', that means it doesn't check all item types, it just picks a random one out, and if it's not the item you're holding it won't drop.

Anyways, if you want this to work, I'd use 2 triggers

1 for when you pick up a sword for the first time, to turn on the second trigger that would drop each sword you pick up

oh and you'll need a third trigger to turn the second off for when you drop the item (use a variable for that item)
 
Last edited by a moderator:
While your at it skamigo why not throw in a fourth trigger for when you think about the item? And maybe a fifth just for the lulz.
 
Status
Not open for further replies.
Back
Top