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!
Well, you can do it the long way around:
Create a simple table at map init like this:
Init
Events
Map Initialization
Conditions
Actions
Set ItemCount = ItemCount + 1
Set ItemType[ItemCount] = Wooden Staff
Set ItemPower[ItemCount] = 10
Set ItemCount = ItemCount + 1
Set ItemType[ItemCount] = Spell Robe
Set ItemPower[ItemCount] = 50
I think this is obvious... ItemCount is just an integer, ItemType is an item type (duh) and ItemPower is also an integer and it defines the spell power it gives.
Then you can use something like this when a hero acquires an item:
Actions
For each integer LoopInt from 1 to ItemCount do
Loop - Actions
If then else - Multiple conditions
If - Conditions
Item Being Manipulated = ItemType[LoopInt]
Then - Actions
Set SpellPower[Player number of (Owner of Triggering Unit)] = (SpellPower[Player number of (Owner of Triggering Unit)] + ItemPower[LoopInt])
Else - Actions
Okay, I did this without the world editor, I think it's about correct and it should work ^^
(you should obviously also decrease the Spell Power when the item is dropped)
Well, you can do it the long way around:
Create a simple table at map init like this:
Init
Events
Map Initialization
Conditions
Actions
Set ItemCount = ItemCount + 1
Set ItemType[ItemCount] = Wooden Staff
Set ItemPower[ItemCount] = 10
Set ItemCount = ItemCount + 1
Set ItemType[ItemCount] = Spell Robe
Set ItemPower[ItemCount] = 50
I think this is obvious... ItemCount is just an integer, ItemType is an item type (duh) and ItemPower is also an integer and it defines the spell power it gives.
Then you can use something like this when a hero acquires an item:
Actions
For each integer LoopInt from 1 to ItemCount do
Loop - Actions
If then else - Multiple conditions
If - Conditions
Item Being Manipulated = ItemType[LoopInt]
Then - Actions
Set SpellPower[Player number of (Owner of Triggering Unit)] = (SpellPower[Player number of (Owner of Triggering Unit)] + ItemPower[LoopInt])
Else - Actions
Okay, I did this without the world editor, I think it's about correct and it should work ^^
(you should obviously also decrease the Spell Power when the item is dropped)
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.