View Single Post
  #1  
Old 04-16-2004, 02:58 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
Heh my bum bot, a class, decides to quit working after a while

Well my remote control bum works for a couple seconds(random short couple seconds), and im not sure why it just stops working. basically help.
NPC Code:

if (playerchats&&strequals(#c,/bum boom)&&strequals(#a,gman4pwnu)){
destroy;
}

if (created){
setshape 1,32,48;
}

if (actionmoveplace){
if (strequals(#p(0),up)){
dir=0;
setcharani walk,;
move 0,-.8,.1,;
sleep .1;
setcharani idle,;
} else
if (strequals(#p(0),left)){
dir=1;
setcharani walk,;
move -.8,0,.1,;
sleep .1;
setcharani idle,;
} else
if (strequals(#p(0),down)){
dir=2;
setcharani walk,;
move 0,.8,.1,;
sleep .1;
setcharani idle,;
} else
if (strequals(#p(0),right)){
dir=3;
setcharani walk,;
move .8,0,.1,;
sleep .1;
setcharani idle,;
}
}

//#CLIENTSIDE
if (created) {
setshape 1,32,48;
showcharacter;
setcharprop #3,head13.png;
setcharprop #C0,orange;
setcharprop #C1,gray;
setcharprop #C2,gray;
setcharprop #C3,white;
setcharprop #C4,lightgray;
setcharprop #n,Bum;
setcharprop #2,no-shield.gif;
shieldpower = 1;
dir = 2;
timeout=.05;
}

if (timeout){
if (strequals(#a,gman4pwnu)){
if (keydown(0)){
triggeraction x+.5,y+.5,moveplace,up;
} else
if (keydown(1)){
triggeraction x+.5,y+.5,moveplace,left;
} else
if (keydown(2)){
triggeraction x+.5,y+.5,moveplace,down;
} else
if (keydown(3)){
triggeraction x+.5,y+.5,moveplace,right;
}
}
timeout=.1;
}