Code
#define ent_id skill90
#define id_dog  1000
#define id_cat  1001
//#define id_snake 1002 // and so on...

void do_bark() { ...snd_play (snd_bark, 50, 0);... }
void do_miau() { ...snd_play (snd_miau, 50, 0);... }

action Dog_WED(){
   ent2 = me;                   // please try to avoid using such global entity pointers, if possible
   my.ent_id = id_dog;
   //my.emask |= ENABLE_FRICTION;
}
action Cat_WED(){
   ent3 = me;
   my.ent_id = id_cat;
   //my.emask |= ENABLE_FRICTION;
}

/*
   Or instead of using a action for every ent (animals in my example) you can combine it in one WED action.
   Skill will be masked in WED as "AnimalNr". 0/1 = dog   2 = cat
   Same you can do with do_bark and do_miau...fex: void do_animalsound (var sndnr){ if (sndnr==1){}}
*/

//skill1 AnimalNr 0
action Animal_WED(){
   if (my.skill1 <= 1){
      //ent2=me;
      my.ent_id = id_dog;
   }
   if (my.skill1 >= 2){
      //ent3=me;
      my.ent_id = id_cat;
   }
}

void testevent(){
   if (event_type == EVENT_FRICTION){ // ent1(me) hit another activated entity(you)? which one?
      if (you){                       // if (you == ent2)
         if (you.ent_id == id_dog){   // ent1 hit ent2?  (when not using global pointers this will also work for more than one(ent2) dog-ents btw)
            do_bark();
         }                            // if (you == ent3)
         if (you.ent_id == id_cat){   // ent1 hit ent3?
            do_miau();
         }
      }
   }
}

...
...
pXent_setcollisionflag (ent1, ent2, NX_NOTIFY_ON_START_TOUCH); // activate coll between ent1 and ent2 / dog    (ent1 or better "my" instead?)
pXent_setcollisionflag (ent1, ent3, NX_NOTIFY_ON_START_TOUCH); // activate coll between ent1 and ent3 / cat
...
...

//ent1.emask |= ENABLE_FRICTION; // ent1 or better "my" instead?
ent1.event = testevent;        // ent1 handles collision event: hit a dog(ent2)? then bark! hit a cat(ent3)? miau!
Something like this will do the trick. Activate coll between ents. In event type friction react on it and check what type of entity it was.
I never used this command before thats why i made an example about event impact. Anyway it does not change much how to handle this as u can see.

And like i already said please try to do this without global entity pointers like ent1, ent2 and ent3. My example event shows you wont need them most times.
Lets say you make a FPS. Ideally you have something like two global entity pointers. A player and a gun laugh. Of course you end up with more for sure, i just want to point out that you can do 90% without those unique ENTITY*'s



Good luck.
Greets


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;