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

Item Combination Trigger Help

Status
Not open for further replies.
Level 3
Joined
Oct 14, 2005
Messages
37
In my map, I want to have an item such that when you 'use' a charge of the item, it instead drops an item of that type with one charge next to the hero OR if there is already an item of that type close to the hero, adds a charge to the pre-existing item. I already have a trigger that when you pick up an item, it adds to the charges of one you already have, so in theory this should be a zero-sum system - 'dropping' and picking up the item in any combination should result in the same number of charges existing.

However, my trigger for 'dropping' the item doesn't work correctly - it adds a charge to EVERY item of that type near the hero, and drops a new item regardless, for a net increase in the number of item charges. Here is the text of my trigger:


Item Uncombine Hydra Scale
Events
A unit Uses An item

Conditions
[Item-type of [Item being manipulated]] Equal to Hydra Scale

Actions
Item - Pick every item in [Region centered at [Position of [Hero manipulating item]] with size [256.00, 256.00]] and do [Actions]
Loop - Actions
If [All Conditions are True] then do [Then actions] else do [Else actions]
If - Conditions
Item-type of [Picked item] Equal to Hydra Scale
[[Picked item] is Owned] Not equal to True

Then - Actions
Item - Set charges remaining in [Picked Item] to [[Charges remaining in [Picked item]] + 1]
Skip remaining actions

Else - Actions (None)

Item - Create Hydra Scale at [Position of [Hero manipulating item]


As best as I can figure the Skip remaining actions command is not being implemented. Is there a better way to do this, or at least a way to fix this without using a boolean variable to stop iterating and create the item?
 
Level 4
Joined
Feb 12, 2006
Messages
99
What they mean is separating item charges so that you don't have to manipulate the whole thing at once :wink:
 
Level 3
Joined
Oct 14, 2005
Messages
37
The intent is to create the equivalent of dropping a single charge of the item, which either creates a new item of that type with one charge or adds a charge to an existing, adjacent item of that type. This allows you to, for example, drop 5 Hydra Scales so your ally can have his Hydra Tea, but keep most of the 40 Hydra Scales you've been saving for your Super Hydra Biscuit. The adding charges to a nearby item function is intended to reduce clutter, which is fairly important once you get more than about five Scales on the ground. Not only are the dropped items vulnerable to theft, the poor sap trying to pick up twenty seperate scales is liable to get ganked.
 
Status
Not open for further replies.
Top