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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Item Stack System.w3x
Variables
Stacking Items
Add charges
Split
Add charges With full inventory
Arrive
Change issue
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
Item
item
No
L
location
No
order
integer
No
unit
unit
No
Add charges
Events
Unit - A unit Acquires an item
Conditions
(Item-class of (Item being manipulated)) Equal to Charged
Actions
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
(Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
Then - Actions
Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer A)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
Item - Remove (Item being manipulated)
Else - Actions
Split
Events
Unit - A unit Is issued an order targeting an object
Conditions
Actions
Custom script: set udg_order = GetIssuedOrderId()
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
order Greater than or equal to 852002
order Less than or equal to 852007
(Target item of issued order) Equal to (Item carried by (Ordered unit) in slot (order - 852001))
(Charges remaining in (Target item of issued order)) Greater than 1
Then - Actions
Item - Set charges remaining in (Target item of issued order) to ((Charges remaining in (Target item of issued order)) - 1)
Set Variable Set L = (Position of (Ordered unit))
Item - Create (Item-type of (Target item of issued order)) at L
Custom script: call RemoveLocation(udg_L)
Item - Set charges remaining in (Last created item) to 1
Else - Actions
Add charges With full inventory
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Item-class of (Target item of issued order)) Equal to Charged
(Number of items carried by (Ordered unit)) Equal to 6
Actions
Set Variable Set Item = (Target item of issued order)
Set Variable Set unit = (Ordered unit)
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by unit in slot (Integer A))) Equal to (Item-type of Item)
(Item carried by unit in slot (Integer A)) Not equal to Item
Then - Actions
Unit - Order (Ordered unit) to Move To . (Position of (Target item of issued order))
Set Variable Set Item = (Target item of issued order)
Set Variable Set unit = (Ordered unit)
Else - Actions
Arrive
Events
Time - Every 0.01 seconds of game time
Conditions
unit Not equal to No unit
Item Not equal to No item
Actions
Unit Group - Pick every unit in (Units within 150.00 of (Position of Item) matching ((Matching unit) Equal to unit).) and do (Actions)
Loop - Actions
For each (Integer A) from 1 to 6 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item carried by unit in slot (Integer A))) Equal to (Item-type of Item)
(Item carried by unit in slot (Integer A)) Not equal to Item
Then - Actions
Item - Set charges remaining in (Item carried by unit in slot (Integer A)) to ((Charges remaining in (Item carried by unit in slot (Integer A))) + (Charges remaining in Item))
Item - Remove Item
Unit - Order unit to Stop .
Set Variable Set Item = No item
Set Variable Set unit = No unit
Else - Actions
Change issue
Events
Unit - A unit Dies
Unit - A unit Decays
Unit - A unit Changes owner
Unit - A unit Pawns an item (to shop)
Unit - A unit Sells an item (from shop)
Unit - A unit Begins channeling an ability
Unit - A unit Begins casting an ability
Unit - A unit Spawns a summoned unit
Unit - A unit Starts the effect of an ability
Unit - A unit Is issued an order targeting a point
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.