What code should I use to make an pickup object “when player hit obj, obj is removed and score is +10”
I have tried this found in the Help content
function bounce_event()
{
if (event_type == EVENT_IMPACT)
{
ent_playsound(my,explode,50);
ptr_remove(me); // disappear when hit
}
}

action exploding_barrel()
{
my.ENABLE_IMPACT = ON; // sensible for push collision
my.emask |= ENABLE_IMPACT;
my.event = bounce_event;
...
}
but nothing happened and tired other ways but still no luck. Do they need to both be in void main if so they crash when its ran.