View Single Post
  #2  
Old 06-01-2002, 09:09 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
Re: timeout, for, callnpc

Quote:
Originally posted by nyghtGT
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.
Um...not sure but....i think you have to change this
NPC Code:

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


i dont think graal can sleep that high...0.05 is its min...im almost posotive
__________________
Reply With Quote