Thread: Car Trouble ~.~
View Single Post
  #3  
Old 08-27-2005, 05:30 PM
Foggy Foggy is offline
Can you dance to my beat
Foggy's Avatar
Join Date: May 2005
Location: N.Ireland, Larne
Posts: 80
Foggy is on a distinguished road
Send a message via AIM to Foggy Send a message via MSN to Foggy
Quote:
Originally Posted by Lance
He just told you.
Is this it then? And how do I make move and make sounds?

NPC Code:
// NPC made by FOGGY
if (created || timeout) {timeout=.05}
if (playersays(/in)) {this.mode=1;disabledefmovement;}
if (playersays(/out)) {this.mode=0;enabledefmovement}
if (timeout && this.mode=1) {
if (keydown(0)) {dir=0;if (!onwater(x+1.5,y+2)) {setcharani my_car,} else {setcharani swim,;};if (!onwall(x+1.5,y+.7)) {y-=this.speed}}
if (keydown(1)) {dir=1;if (!onwater(x+1.5,y+1.5)) {setcharani my_car,} else {setcharani swim,;};if (!onwall(x+.2,y+2)) {x-=this.speed}}
if (keydown(2)) {dir=2;if (!onwater(x+1.5,y+2)) {setcharani my_car,} else {setcharani swim,;};if (!onwall(x+1.5,y+3.2)) {y+=this.speed}}
if (keydown(3)) {dir=3;if (!onwater(x+1.5,y+1.5)) {setcharani my_car,} else {setcharani swim,;};if (!onwall(x+2.8,y+2)) {x+=this.speed}}
if (!keydown(0) && !keydown(1) && !keydown(2) && !keydown(3) && !keydown(5) && !onwater(x+1.5,y+1.5)) {setcharani my_car,}
}

__________________
Reply With Quote