Quote:
Originally Posted by Chompy
PHP Code:
// Will shoot a projectile in the direction of the player
//#CLIENTSIDE
function onCreated() {
temp.startx = player.x+vecx(player.dir);
temp.starty = player.y+vecy(player.dir);
temp.startz = player.z;
temp.angle = getangle(vecx(player.dir), vecy(player.dir));
temp.zangle = 0;
temp.power = 0;
temp.ani = "arrow"; // projectile ani
temp.aniparam0 = 0;
temp.aniparam1 = 0;
// etc
shoot(temp.startx, temp.starty, temp.startz, temp.angle, temp.zangle, temp.power, temp.ani, temp.aniparam0, temp.aniparam1); // etc with the aniparams
}
|
May I suggest the following changes for the starting position:
PHP Code:
temp.startx = player.x + 1.5 + vecx(player.dir);
temp.starty = player.y + 2 + vecy(player.dir);