![]() |
theres somthing wrong with my gun script
2 Attachment(s)
PHP Code:
its like this if i turn it on then shoot it shoots where i stand when i move to a difrent spot it shoots from the same spot that i shot from when i fire it again until i shoot again ok ill show you what i mean heres a pic it goes from this http://forums.graalonline.com/forums...1&d=1235351866 ]to this http://forums.graalonline.com/forums...1&d=1235351866 so its from the first pic to the second pic up to down |
bored enough to post..
Quote:
PHP Code:
PHP Code:
And why are you setting these after you have already "shot" the bullet? More than that, this.x and this.y are reserved vars; Use something else like this.dx and this.dy PHP Code:
PHP Code:
|
This is like, you're third thread for the exact same script.
You need to use this for your angle: PHP Code:
|
Quote:
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. |
I can see you're assigning values to playerdir rather than comparing them. Instead of using playerdir = 0 or playerdir = 1, use playerdir == 1.
|
All times are GMT +2. The time now is 12:02 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.