Bloodbane
Well-known member
But someone knows how to make the bullets bounce when robots are shooted? Did I have to spawns "bullets" entities using the takedamagescript and the attack types?
The best way is to use didhitscript on the bullets. When a bullet hit certain enemies, it tosses "bullet" back.
Detecting those enemies might need small trick such as defense setting. You could set say defense normal 0.9 to robots which if detected by the bullet, it will do the aforementioned stuffs. The difference is small so it won't impact much on regular beating though.
By the way, does anyone know how to make an enemy "auto move" to a certain x/z location in the stage, like the player (Steven) did at the end of the video? (I need help with that -_-).
You could use targetting script preferably the time based one and instead of targetting opponent, the script targets specific coords.
Like this function:
C:
void targetPos(int Time, int Tx, int Ty, int Tz, int Flip, int Flag)
{// Targetting defined position before leaping or dashing. Time Based.
// Time = Time to reach destination
// Tx = Destined x coordinate
// Ty = Destined y coordinate
// Tz = Destined z coordinate
// Flip = flag to flip to target or not, 0 = no change, 1 = flip
// Flag = flag to choose relative to screen or absolute, 0 = absolute, 1 = screen
void self = getlocalvar("self");
float x = getentityproperty(self, "x");
float y = getentityproperty(self, "y");
float z = getentityproperty(self, "z");
int XPos = openborvariant("xpos"); //Get screen edge's position
float Vx, Vy, Vz, Sy;
if(Flag == 1){
Tx = Tx+XPos;
}
if(Time == 0){
Time = 1;
} else if(Time < 0){
Time = -Time;
}
if(Flip == 1){
if(Tx < x){
changeentityproperty(self, "direction", 0);
} else {
changeentityproperty(self, "direction", 1);
}
}
Sy = Ty - y;
Vy = 0.05*Time + Sy/Time;
Vx = (Tx-x)/Time;
Vz = (Tz-z)/Time;
setlocalvar("x"+self, Vx);
setlocalvar("y"+self, Vy);
setlocalvar("z"+self, Vz);
}
You use dash function after that function like in regular targetted attack.