Hey guys, you know how in warcraft 3 there is an backpack ability that allows regular units to buy items from shops ?
Well, i got that part working. But how do i stop the regular units from being able to cast item abilities.. Like say an item casts Scanner Sweep to reveal cloaked units. How do i make it so that only heroes can cast item abilities?
Add a validator to the first effect of your item or ability that checks whether the unit in question fits your desires. It could be "Is Heroic" or a behavior check for whatever your veterancy behavior is.
I figured some out during the wait for a reply. I figured since the unit does not have an energy pool ( the item courier). I might as well put a vital cost to item abilities .. Like requires .0001 energy to cast. Which is nothing for heroes to use. But that alone stops the unit from casting since it has no energy pool.
Hey guys, you know how in warcraft 3 there is an backpack ability that allows regular units to buy items from shops ?
Well, i got that part working. But how do i stop the regular units from being able to cast item abilities.. Like say an item casts Scanner Sweep to reveal cloaked units. How do i make it so that only heroes can cast item abilities?
Add a validator to the first effect of your item or ability that checks whether the unit in question fits your desires. It could be "Is Heroic" or a behavior check for whatever your veterancy behavior is.
another solution could be to add a requirement to the inventory ability orders
i see, thanks for replys
I figured some out during the wait for a reply. I figured since the unit does not have an energy pool ( the item courier). I might as well put a vital cost to item abilities .. Like requires .0001 energy to cast. Which is nothing for heroes to use. But that alone stops the unit from casting since it has no energy pool.
My ghetto method.