Warcraft III resources & community, 2003–2006 · archived

Most likely the easyist thing ever asked ^^

16 posts
#1

Most likely the easyist thing ever asked ^^

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

and if its simple don't flame me im stupid :oops:
#2

dont know

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
#3
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????
#4
Shadow-x969an 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:

-Rui
#5
Rui
Shadow-x969an 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:

-Rui



i need some 1 to teach me about varibales. i don't understand them ... :'(
#6
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.

-Rui
#7
I've just answered the thing about stackable items a few days (or weeks? ;-) ) ago: http://wc3sear.ch/viewtopic.php?t=11490 Anyways here it is again:
klovadis
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:


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.


Pleased to help,

klovadis
#8
mind making me a Example map ? ^^ please so i can get the consept of the triggers
#9
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.

-Rui
#10
you see i can't i tryed and i cant find the sub triggers b/c he diden't state the well enough!!....

he was not detailed enough for my small brain... lol xD
#11
He wasnt specified only in conditions -.-'
Oh well....

-Rui
#12
well i like pictures or detailed info..

sorry but i guess im just a pain in the A$$..

but i like to know things in this format

-Vaireabuls
~(names/#'s/Type)

-event
~ (blah)

-conditions
~ (blah)

-actions
~ (type and name of action)


this way would be easyer for me if you would please show it to me in this format

or a map would proly be much less fo a hastle .
#13
that is what he did... if you cant see that re-read it a few times and maybe you'll get it.
#14
Minkorokthat is what he did... if you cant see that re-read it a few times and maybe you'll get it.


ummm ive re-read that over 20 times now and i still don't get it -.-
#15
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
-klovadis


Dude, maybe if u actually tried Reading what he wrote :evil: :P