I was originally detecting a collision between Lnk and the item but this seems to be flawed due to weird item hitboxes. BigJoe's idea is to just check if the item becomes invalid. I am not certain this is full-proof just yet. This seems to work fine in an FFC script but global script would be more complicated. And what about FFCs carrying over?
Is there another way to do it?
With the first method: If an item disappears then it would count as a pickup, so that's no good for all items but would still work for some. The easiest way would probably be ... *wait for it* ... Item pickup scripts. :P
//script that when set to an item pickup slot maims Link.
item script MyNefariousItemPickup
{
void fun()
{
//item has been picked up already
Link->HP = 1;
FunctionThatLetsAScriptKnowTheItemWasPickedUpWowThisIsAReallyLongNameDood();
}
}
I think this is what you were looking for.
Unfortunately, no. That could work if it was just one item but the item is set through an ffc argument so it can be any in game item. It would be nice to assign a script to an item on demand. That could get in the way of a already assigned item script though...
I think i may figure out where the collision actually happens.
Yuck.
Okay: Plan B Hack: If the item is null then just extend the items hitbox by 16. If there's a collision with that then Link probably picked up the item. :shrug: