O Ilusionista
Captain 100K
While making an obstacle which, uppon hit, can hit enemies (or players, if enemies hit him), I was thinking that something was acting weird with the counterrange.
Lagarto confirmed this to me: it seams that, when you use counterrange, the entity doesn't register who is its "opponent":
Lagarto suggested to use takedamagescript instead, and it works. But is that a limitation of counterrange?
Lagarto confirmed this to me: it seams that, when you use counterrange, the entity doesn't register who is its "opponent":
Code:
void self = getlocalvar("self");
void opp = getentityproperty(self,"opponent");
int direction = getentityproperty(opp,"direction");
if (frame == 0 && direction ==1)changeentityproperty(self,"velocity",2);
if (frame == 0 && direction ==0)
{
changeentityproperty(self,"velocity",-2);
changeentityproperty(self,"animation",openborconstant("ANI_FOLLOW2"));
}
Lagarto suggested to use takedamagescript instead, and it works. But is that a limitation of counterrange?