HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Catching when a Unit uses an Item

03-11-2009, 10:54 PM#1
Blacktastic
Ok, this is really strange. I am having trouble detecting a unit using an Artifact. Actively Used is set to true, and this is the code

Expand JASS:

Why is this not catching the item being used? The item has the "manual of hp" ability that adds 0 hp and plays no graphic.
03-11-2009, 11:06 PM#2
moyack
Why not detect the item ability?
03-11-2009, 11:08 PM#3
Blacktastic
Already tried, does nothing as well.

Expand JASS:

Edit: Forgot to type JASS at the end of Hidden. Damn ninjas.
03-11-2009, 11:15 PM#4
xombie
So this function does not display "lawl"?
03-11-2009, 11:19 PM#5
akolyt0r
try this snippet and tell us what it displays when you use the item...
Expand JASS:
03-11-2009, 11:19 PM#6
Blacktastic
That isn't going to change a single thing...

Edit: i have something almost identical to that in my map actually. It returns

852008
03-11-2009, 11:22 PM#7
xombie
Hmmm... try changing the InitTrig to a private function and then add an initializer InitTrig at the top of the scope.
03-11-2009, 11:33 PM#8
Blacktastic
That works, but I have plenty of other triggers with the function InitTrig that are all private and work just fine without initializer.

Strange.
03-11-2009, 11:36 PM#9
xombie
I'm not sure how well public function InitTrig works anymore, but that used to be the vJass syntax for initializers in scopes. Also, having the default function InitTrig_TriggerName might work as well.