Hello,
My unhandled_event function doesn't seem to work (I don't have Any Click event defined - so this is not the case). When I try to pick up hotspot character goes with default "I can't do that" message instead of "Can't pick that up" one...I tried to leave only 'type' 7 or 5 and omit 'what' completely but it didnt help at all...Help?
Code:
function unhandled_event ( int what, int type )
{
if((type==5 && what==2) || (type==7 && what==1))//Pick up object or hotspot - Doesnt work????
{
player.Say("Can't pick that up_really_");
}
else
{
player.Say("I can't do that_");
}
}
Ok it seems mouse_modes are messed up somehow...(no idea why though! they call the functions respectively but they have different "what" and "type" values...it affects automatic function naming when creating events. Any idea why is that?
The numbering of the events is really old, from a time when stuff didn't have nice script names. You had to reference everything by numbers then.
But yes, even then type wasn't consistent with the cursor mode IDs. Not sure why, but that's the way it is.
However, you can always ignore what and type and use GetLocationType and mouse.Mode instead.