View Single Post
  #1  
Old 06-01-2002, 06:10 PM
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
timeout, for, callnpc

Can anyone enlighten me why these NPCs will not work:
NPC Code:

// Number One
if (created||playerenters) {
timeout=0.05;
}
if (timeout) {
do3();
do2();
sleep 0.05;
seteffect 1,0,0,0;
timeout=0.05;
}

// FUNCTIONS
function do3() {
for (i=0;i<npcscount;i++) {
callnpc i,dothree;
}
}
function do2() {
for (i=0;i<npcscount;i++) {
callnpc i,dotwo;
}
}


NPC Code:

// Number Two
if (dotwo) {
sleep 0.075;
seteffect 0,1,0,0;
}


NPC Code:

// Number Three
if (dothree) {
sleep 0.1;
seteffect 0,0,1,0;
}


It's basically to beat that 20fps thing.
Reply With Quote