Thread: Skateboard npc
View Single Post
  #21  
Old 02-21-2002, 10:42 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by relenakat
x.x Well it wasn't the keydown but now....I looped timeouts and it's totally weird x.x it puts me off screen even
NPC Code:
// NPC made by Sage Deamon Slayer {Dragon Warrior}
if (playerenters) {
}
if (playertouchsme) {
toweapons Flying shoes;
}
if(weaponfired){
timeout = .5;
}
while(timeout){
if (playerdir=0) { playery-=3; }
if (playerdir=1) { playery-=3; }
if (playerdir=2) { playerx+=3; }
if (playerdir=3) { playerx+=3; }
timeout = .5;
}

i advise against the use of 'while (timeout)' it basically does the same thing as 'if (timeout)'