Hi!
I would do different kind of types for entities, like this:
#define obj_type skill40
#define obj_none 0
#define obj_player 1
#define obj_barrel 2
And then in the event (of the barrel, that got scaned), I would check for it via 'you' pointer, like this:
if(you.obj_type == obj_player){ return; } // terminate the event
if(you.obj_type == obj_barrel){
EXPLOSION HERE!
}
Best regards!