• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Most likely the easyist thing ever asked ^^

Status
Not open for further replies.
Level 2
Joined
May 24, 2005
Messages
8
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:
 
Level 2
Joined
May 24, 2005
Messages
8
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????
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Shadow-x969 said:
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:

-Rui
 
Level 2
Joined
May 24, 2005
Messages
8
Rui said:
Shadow-x969 said:
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:

-Rui


i need some 1 to teach me about varibales. i don't understand them ... :'(
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
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
 
Level 4
Joined
Jan 3, 2005
Messages
91
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 said:
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.

Pleased to help,

klovadis
 
Level 2
Joined
May 24, 2005
Messages
8
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
 
Level 2
Joined
May 24, 2005
Messages
8
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 .
 
Level 2
Joined
Apr 4, 2005
Messages
12
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
 
Level 2
Joined
May 24, 2005
Messages
8
furnace78 said:
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


THAT WAS EXATLY WHAT I WANTED THANK YOU!!!
 
Status
Not open for further replies.
Top