• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

item stacking help

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
i need help with some basic item stacking (potions mainly)
i have read some tutorials but i cant seem to find half of the triggers/variables needed, so im wondering if anyone could help out by me giving them the map and they uplaod the trigger i dont know, or if there is another way or if someone has some ready made stacking triggers this would be great, thx for anyt help.
 
Level 5
Joined
Mar 12, 2005
Messages
117
getting other people to do it will not help you learn. however further down the list of rdz item stacking of doom tutorial ther a really simple tutorial

Quote:
Penknight wrote:


This items stacking method is a little confusing and uses some variables. I have a suggestion

1. Have the hero pick up the item
2. Check if hero has any of the same kind
3. Stack

Here is my code (universal item stacker)
For condition add the items that are stackable.

Item Stacking

Event A unit aciqure an item
condition Stackable items (like potion)

Action

For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions

For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions

(Integer A) Not equal to (Integer B)

(Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B)))

Then - Action

Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer B))))

Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))

Else - Actions
Do nothing

If you don't understand PM me (unQuote)

quote was taken from penknight in rdz stacking system of doom post

plus you can pm if you dont understand, which is nice :) hope that helps
 
Status
Not open for further replies.
Top