char*key=GetKeyState();
if(key[KEY_LEFT] == 1)DIR = 0;
if(key[KEY_RIGHT] == 1)DIR = 1;
if(DIR == 0)xvelocity = - 10;
if(DIR == 1)xvelocity = 10;
AnimeTank wrote:I wrote all the information you gave me in the script and it worked out fine, but theres another bug. It's kind of difficult for me to say but let me try anyway. When i shoot my gun one way and then i turn the other way, the bullets then change direction and head the way i am looking! If i shoot and turn the other way, the bullet is just gonna keep going the direction i'm facing... back and forth, back and forth. Can you help me out?
AnimeTank wrote:??? Can you specify?
if(DIR == 0)x -= 10;
if(DIR == 1)x += 10;
if(DIR == 0)xvelocity = -10;
if(DIR == 1)xvelocity = 10;
AnimeTank wrote:Hmm... i don't know whats the problem. I tried everything you told me but it still does what it usually does... Hmmm, i wonder if i'm doing something wrong...
if(DIR == 0){x -= 10;}
if(DIR == 1){x += 10;}
if(DIR == 0){xvelocity = -10;}
if(DIR == 1){xvelocity = 10;}
Fuzzy wrote:
- Code: Select all
if(DIR == 0){x -= 10;}
if(DIR == 1){x += 10;}
- Code: Select all
if(DIR == 0){xvelocity = -10;}
if(DIR == 1){xvelocity = 10;}
Corrected...
if(DIR == 0)xvelocity = - 10;
if(DIR == 1)xvelocity = 10;
Users browsing this forum: No registered users and 1 guest