16-bit Fighter
Active member
I customed a didhit script from SOR2X (Adam's one) for a char to be horizontally slowed down when hitting a char during his run attack that is an air attack. The attack's curve works fine in x axis. But the problem is I don't know what to do for the third parameter (I don't know its name and I don't find it in the manual) to make the char keep on unaffectedly his move in y axis. For now I wrote down 1.5 but it's not perfect since sometimes the char seems to jump a little when hitting an an enemy or obstacle.
I just put the didhit script below, I don't think the run attack move has to be shown (tell me if it has).
Thanks in advance for any help and sorry if the thread must be in "Ask and Answer".
I just put the didhit script below, I don't think the run attack move has to be shown (tell me if it has).
void main()
{ void self = getlocalvar("self");
void vAniID = getentityproperty(self,"animationID");
float xVel = getentityproperty(self,"xdir");
if(vAniID == openborconstant("ANI_RUNATTACK")){
changeentityproperty(self, "velocity", xVel/1.6, 0, 1.5);
}
}
Thanks in advance for any help and sorry if the thread must be in "Ask and Answer".
Last edited: