• 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.

[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:
Level 4
Joined
Jun 4, 2008
Messages
49
  • 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?
 
Level 9
Joined
May 22, 2009
Messages
276
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:
Level 7
Joined
Oct 14, 2008
Messages
340
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.
Top