Quote:
Originally Posted by cbk1994
This is like, you're third thread for the exact same script.
You need to use this for your angle:
PHP Code:
temp.angle = (pi / 2) * (player.dir + 1);
Look carefully at your code, then look up something called "order of operations"; it will explain why "your" angle didn't work, though it is nearly the same.
|
There are many things wrong with this script, but ironically, it is not this.
To clarify, match your brackets properly, and use player.x + 2*vecx(player.dir) + vecy(player.dir) and player.y + 2*vecy(player.dir) instead of this.x and this.y respectively.