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!
ok if i wnat an item to stack such as when i buy the scame item it will jsut put that lil # insted of takeing upanother 1 of my gotdamn item slots how would i do that?.
dont feel stupid ive been map making for 2 years and have wondered how to do that im a very advanced triggerer too so gratz to whoever knows please tell us
an advanced trigger editor would know how to do this -.- b/c even i could do it with triggers i just don't wanna make that many items just for the dame game .... it would be something like this
current player own's ring #1 remove Ring #1 give unit Ring#2 but that would be a pain in the ass b/c i would need so many damn triggers is there any other way????
an advanced trigger editor would know how to do this -.- b/c even i could do it with triggers i just don't wanna make that many items just for the dame game .... it would be something like this
current player own's ring #1 remove Ring #1 give unit Ring#2 but that would be a pain in the ass b/c i would need so many damn triggers is there any other way????
Hes right lol, an advanced triggerer would know how to do this. Klovadis knows how to do this. You have to use a varibale and "bla bla bla" you should PM him but im sure he will read this :lol:
an advanced trigger editor would know how to do this -.- b/c even i could do it with triggers i just don't wanna make that many items just for the dame game .... it would be something like this
current player own's ring #1 remove Ring #1 give unit Ring#2 but that would be a pain in the ass b/c i would need so many damn triggers is there any other way????
Hes right lol, an advanced triggerer would know how to do this. Klovadis knows how to do this. You have to use a varibale and "bla bla bla" you should PM him but im sure he will read this :lol:
Variables are to store information, in few words, they are units but cannot be placed on map of course, (-.-') for example, to create a timer you have to use a variable, but im not good at explaining, PM klovadis and ask him to post it here.
Also, there are some topics related to this in the Maps Section.
of course you can stack items on picking them up, but it only makes sense to some extend since you cannot "split" them again. You can however use it for potions and scrolls, ankhs and stuff like that, but it requires some triggering work.
Also you have to decide wether you want stackable items to be stacked at the time they are being picked up or as you stack them manually. Both is possible, but I will only explain the first version:
First, make an array of item-types of items that you want to make stackable and a function that runs at map initialisation and that fills the array with those item types (i.e. Set Stackable_Items[0] = Potion of Healing, Set Stackable_Items[1] = Potion of Greater Healing, ..). Also you will need a dummy integer variable to store values, I will call it "dInteger".
Ok now the main trigger:
Code:
Events:
- A unit acquires an Item
Conditions:
- None
Actions:
- For each (Integer A) from 0 to [The number of items in your stackable_items array] Do Action:
- If ( Item-Type of (Item Being Manipulated) Equal To (Stackable_Items[Integer A]) ) Then ( Set dInteger = Integer A ) Else ( Do Nothing )
- For each (Integer A) from 1 to 6 Do Actions:
- IF:
- Item type of ( Item carried by (Triggering Unit) in slot (Integer A) ) Equal To ( Stackable_Items[dInteger] )
- Item carried by (Triggering Unit) in slot (Integer A) Not Equal To (Item Being Manipulated)
THEN:
- 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 ) )
- Remove (Item Being Manipulated)
- Skip Remaining Actions
Short explaination of what we do: First we check wether an item being picked up is a stackable one by comparing its item-type to the item-types stored in the array.
Then we check the inventory of our triggering unit for that item-type, but since we don't want the item to be added to itself, we check, too, that the item picked up is not equal to the item in that slot.
Finally we add the charges of our picked up item to the valid existing item. Done.
Dude can't you just create the triggers yourself? He told you all you wanted to know, why do you still need an example map? Your just taking his time, but oh well if he has the time I guess its ok.
Actions:
- For each (Integer A) from 0 to [The number of items in your stackable_items array] Do Action:
- If ( Item-Type of (Item Being Manipulated) Equal To (Stackable_Items[Integer A]) ) Then ( Set dInteger = Integer A ) Else ( Do Nothing )
- For each (Integer A) from 1 to 6 Do Actions:
- IF:
- Item type of ( Item carried by (Triggering Unit) in slot (Integer A) ) Equal To ( Stackable_Items[dInteger] )
- Item carried by (Triggering Unit) in slot (Integer A) Not Equal To (Item Being Manipulated)
THEN:
- 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 ) )
- Remove (Item Being Manipulated)
- Skip Remaining Actions
-klovadis
Dude, maybe if u actually tried Reading what he wrote :evil:
Actions:
- For each (Integer A) from 0 to [The number of items in your stackable_items array] Do Action:
- If ( Item-Type of (Item Being Manipulated) Equal To (Stackable_Items[Integer A]) ) Then ( Set dInteger = Integer A ) Else ( Do Nothing )
- For each (Integer A) from 1 to 6 Do Actions:
- IF:
- Item type of ( Item carried by (Triggering Unit) in slot (Integer A) ) Equal To ( Stackable_Items[dInteger] )
- Item carried by (Triggering Unit) in slot (Integer A) Not Equal To (Item Being Manipulated)
THEN:
- 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 ) )
- Remove (Item Being Manipulated)
- Skip Remaining Actions
-klovadis
Dude, maybe if u actually tried Reading what he wrote :evil:
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.