Alright thanks guys I think I understand it all now, gonna keep playing with scripts to get the best handle I can get on them. But thanks again.
Edit: messed up on something, it wasn't
PHP Code:
(player.direction[1])
it was:
PHP Code:
temp.x = (player.x + vecx(player.dir) * 1.5) + this.origins[player.dir][0];
temp.y = (player.y + vecx(player.dir) * 2) + this.origins[player.dir][1];
been doing quite a bit of editing to this script, trying to understand its functions and what not etc. And this wasn't copied/pasted. so yeah sorry about that. If someone could, could they re-explain those lines?