View Single Post
  #4  
Old 07-29-2003, 02:03 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Quote:
Originally posted by Projectshifter
::fully agrees::
We're assuming this is a weapon right?
---Shifter
No weapon, just a normal NPC in a level.

NPC Code:

if (timeout) {
if (this.dir=0) y-=0.3;
if (this.dir=2) y+=0.3;
if (this.dir=1) x-=0.3;
if (this.dir=3) x+=0.3;
message #v(this.dir);

timeout=0.5;
}

if (actionmove) {
this.dir=strtofloat(#p(0));
timeout=1;
}
//#CLIENTSIDE
if (timeout) {
if (keydown(1)&&!this.dir=1) {triggeraction x,y,move,1;this.dir=1;}
if (keydown(3)&&!this.dir=3) {triggeraction x,y,move,3;this.dir=3;}
if (keydown(0)&&!this.dir=0) {triggeraction x,y,move,0;this.dir=0;}
if (keydown(2)&&!this.dir=2) {triggeraction x,y,move,2;this.dir=2;}
timeout=0.05;
}



This is NOT the whole script. Also, the player is attached to it.

EDIT: It wont triggeraction AFTER the first timeout=1; serverside. I have no idea why.
__________________
-Kjetil Valen

Last edited by VeX_RaT_Boy; 07-29-2003 at 02:35 PM..
Reply With Quote