Add this line in the while loop of your energy ball:
you = player;
and use the flag IGNORE_YOU for the c_move, that should do it.
If you have trouble with that you might want to check out IGNORE_PUSH and set the push value of the player entity lower than the energy ball push value.
About your function ENDME:
As far as I can tell from the manual, you need a break; at the end of each case branch:
Code:
function ENDME()
{
switch(event_type)
{
case EVENT_ENTITY:
my.alpha -= 20 * time;
effect(explo,50,my.x,normal);
wait (1);
effect(explo_smoke,40,my.x,normal);
ent_playsound (you, explosion, 300); // sword sound
ent_remove (me);
break;
case EVENT_BLOCK:
my.alpha -= 20 * time;
effect(explo,50,my.x,normal);
wait (1);
effect(explo_smoke,40,my.x,normal);
ent_playsound (you, explosion, 300); // sword sound
ent_remove (me);
break;
}
}
Quote:
The execution continues until either the closing bracket or a break statement is encountered
quoted: The manual (A7)