Hey everyone,
I'm still slaving away at Anachron's Inventory system, just trying to make it suitable for my map's play style. Right now I want to place a restriction on the type of items that the system handles. I want it to ignore power-up class items.
I'm positive this is the right area of code to restrict that, because I already set a unit classification condition where structures also don't use the system (I have a shop). So, altogether, no structures or power up item's will trigger any action, that is my aim.
While the structure condition was successful, the power up item class condition is not, Anachron's system keeps trying to run after I acquire a power up item.
Is there something wrong with my code?
This is in the trigger: CIEvents, if any of you happen to have this system
if the code is ok, what else could be the problem?
I want to make an invulnerability effect where I create a power up item and instantly trigger the hero to consume it (invulnerability potion), resulting in temporary invulnerability. Of course if Anachron's system takes it into it's custom inventory, the trigger will not work (because his system destroys the real item, and creates a destructible in full screen inventory -- which is awesome, but why is it sooo hard to modify)
thanks for reading!
I'm still slaving away at Anachron's Inventory system, just trying to make it suitable for my map's play style. Right now I want to place a restriction on the type of items that the system handles. I want it to ignore power-up class items.
I'm positive this is the right area of code to restrict that, because I already set a unit classification condition where structures also don't use the system (I have a shop). So, altogether, no structures or power up item's will trigger any action, that is my aim.
While the structure condition was successful, the power up item class condition is not, Anachron's system keeps trying to run after I acquire a power up item.
Is there something wrong with my code?
This is in the trigger: CIEvents, if any of you happen to have this system
JASS:
library CIEvents
endlibrary
module CIEvents
public method pick takes CustomItem ci returns boolean
if .checkPickup(ci) and IsUnitType(.carrier,UNIT_TYPE_STRUCTURE)== false and IsItemPowerup(ci.getHandle()) == false then
call ci.pick(.carrier)
call .addItem(ci)
return true
endif
return false
endmethod
if the code is ok, what else could be the problem?
I want to make an invulnerability effect where I create a power up item and instantly trigger the hero to consume it (invulnerability potion), resulting in temporary invulnerability. Of course if Anachron's system takes it into it's custom inventory, the trigger will not work (because his system destroys the real item, and creates a destructible in full screen inventory -- which is awesome, but why is it sooo hard to modify)
thanks for reading!