#1
CraftI 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.
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
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