Quote:
Originally Posted by Black_knights55
Thanks, I really appreciate your explanations. But, when I use the weapon, nothing is shooting. The player freeze and play the ani "shoot" but there no projectile. I don't understand why it doesn't just shoot that shuriken lol.
|
I can't check the GANI now (on Mac), but try setting it to "sword", then listen for the slash sound. You will also see shadows shooting if it works. The code should be similar to
PHP Code:
temp.x = player.x + (vecx(player.dir) * 1.5);
temp.y = player.y + (vecy(player.dir) * 2);
temp.z = 0;
temp.angle = (player.dir + 1) * (pi / 2);
temp.zangle = 0;
temp.power = 0;
temp.ani = "sword";
temp.ani.param = "";
player.level.shoot(x, y, z, angle, zangle, power, ani, ani.param);