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!
I am having the same problem in my CTF map. I think i figured it out though, havn't tested it yet.
Events
Unit- within x range of unit(create a dummy unit that spawns whereever the item is)
Conditions
triggering unit not equal to (whatever your paladin is)
Actions
order triggering unit to stop
game display text message to owner of triggering unit "You cannot use this item."
*not sure if all that is how it would be written out in WE i don't have it open right now but u get the basic idea*
Its a sloppy way of doing things but its the best i've come up with so far. If u come up with anything better lemme know cause i need to get this perfected for my map too.
I am having the same problem in my CTF map. I think i figured it out though, havn't tested it yet.
Events
Unit- within x range of unit(create a dummy unit that spawns whereever the item is)
Conditions
triggering unit not equal to (whatever your paladin is)
Actions
order triggering unit to stop
game display text message to owner of triggering unit "You cannot use this item."
*not sure if all that is how it would be written out in WE i don't have it open right now but u get the basic idea*
Its a sloppy way of doing things but its the best i've come up with so far. If u come up with anything better lemme know cause i need to get this perfected for my map too.
In fact, it is simple when you know what to do. You have two solutions: You can create a region where the item will go if it isn' t the right type of unit picking it up, or stop the unit' s action:
Events
.Unit-A unit picks up an item
Conditions
.Item type-Item type of item picked up Equals to *your item' s type*
.Unit type-Unit type of unit picking up triggering item *or item-type*
Actions
.Item-Move instantly item to region or
.Unit-Order picking unit to stop
But I suggest you use a region, it is easier to do.
theres a few ways to do that, the way i'm about to write (assuming you wish to restrict item use to 1 type per class (1 weapon, 1 armor, etc...) requires a bit of presetup
Event --
map init
Actions --
set paladinequip[0] = sword1
set paladinequip[1] = sword2
set paladinequip[2] = sword3
... ... ...
set paladinequip[10] = armor1
set paladinequip[11] = armor2
Event --
hero acquires item
Conditions --
unit type of hero manipulating item == paladin
level item != 4 //so all classes can carry items (which i denoted as lvl 4)
Actions --
local integer i
local boolean bCheck = false
for i = 0 to nMaxEquip //just the max gear that it will check, in this case 11
+ if item type of manipulated item == paladinequip[i] then
+ + set bCheck = true
for i = 1 to 6
+ if item level of item in slot (i) == item level or manipulated item AND item in slot (i) != manipulated item then
+ + set bCheck = false
if bCheck == false then
+ move manipulated item to position of manipulating hero
and repeated for other heros changing the item arrays
i just wrote this on the spot too without aide of waredit so it might be a little off, but that should be about it (i also know theres prob a better more concise way to do this but sue me, it was the best i could come up with at the time)
theres a few ways to do that, the way i'm about to write (assuming you wish to restrict item use to 1 type per class (1 weapon, 1 armor, etc...) requires a bit of presetup
Event --
map init
Actions --
set paladinequip[0] = sword1
set paladinequip[1] = sword2
set paladinequip[2] = sword3
... ... ...
set paladinequip[10] = armor1
set paladinequip[11] = armor2
Event --
hero acquires item
Conditions --
unit type of hero manipulating item == paladin
level item != 4 //so all classes can carry items (which i denoted as lvl 4)
Actions --
local integer i
local boolean bCheck = false
for i = 0 to nMaxEquip //just the max gear that it will check, in this case 11
+ if item type of manipulated item == paladinequip[i] then
+ + set bCheck = true
for i = 1 to 6
+ if item level of item in slot (i) == item level or manipulated item AND item in slot (i) != manipulated item then
+ + set bCheck = false
if bCheck == false then
+ move manipulated item to position of manipulating hero
Never thought of this way its cool though,,, peoples whoever needs items trigger,,use this one its cooler than other ways.
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.