HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stacking items question

06-07-2004, 09:45 PM#1
Bustaboom
I have a trigger that stacks items of a certain class but i cant get it to remove them properly it simply removes all the item that from the inventory whenever i pick them up. Here is what i have.

Events
Unit - A unit Acquires an item
Conditions
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (((Item-class of (Item being manipulated)) Equal to Charged) and ((Item being manipulated) Not equal to (Item carried by (Hero manipulating item) in slot (Integer A)))) then do (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))) + 1)) else do (Do nothing)
If (((Item-class of (Item being manipulated)) Equal to Charged) and ((Item being manipulated) Not equal to (Item carried by (Hero manipulating item) in slot (Integer A)))) then do (Item - Remove (Item being manipulated)) else do (Do nothing)

I just need to know a way to remove the item that i pick up.

This trigger works fine if i already have an item in my inventory.
06-08-2004, 03:31 AM#2
Bustaboom
no one knows?
06-08-2004, 04:58 AM#3
th15
Buddy, what your trigger is doing is removing all the items not the same type as the item being picked up.

((Item being manipulated) Not equal to (Item carried by (Hero manipulating item) in slot (Integer A)))) then do (Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))

You need to change the bold bit to "Equal to"
06-08-2004, 08:41 PM#4
Bustaboom
Yes i know. I tried that but all that some is simply removes the item that is picked up. That is of course unless one of the same type of item is already in the inventory.