• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Triggers : test if item is "Use automatically when acquired"

Status
Not open for further replies.
Level 12
Joined
Feb 27, 2019
Messages
399
Hello,

From a trigger, is there a way to test if an item is used automatically when acquired or not ?
It is because I am using Dangerb0y's Easy Item Stack 'n Split system, and when trying to pick a power-up or an item that use automatically when acquired, it plays the error sound..

PS: I can already know if the item is a powerup (there are 3 getters to do that : item class comparison, boolean comparison with item status, or item type status xD)
 
Level 10
Joined
Dec 11, 2009
Messages
234
JASS:
constant itembooleanfield ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED
native BlzGetItemBooleanField  takes item whichItem, itembooleanfield whichField returns boolean

I guess this should work:
JASS:
if BlzGetItemBooleanField(myItem, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED) then
//...
endif
 
Status
Not open for further replies.
Top