Thread: Sliders
View Single Post
  #2  
Old 09-23-2001, 05:19 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Sliders

Quote:
Originally posted by ownerofbabylon
I am making a NPC that makes the player slide but for some reason it wont work good. Like i can make it slide fine but its really ***.

// NPC made by Lord Helmut
if (playerenters) {
}
if (playertouchsme) {
toweapons Slider;
}

if(weaponfired&&playerdir==2){
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
sleep .1;
playery+=.1;
}

What would be a better way to make them slide without the damn sleep command? I thought about loops but im not sure which one
try something like

NPC Code:

//NPC Coded By KJL
if(playertouchsme)
toweapons Slider;
if(weaponfired&&playerdir==2){
for(this.i==0;this.i>=20;this.i++){
if(this.i>=10)
this.x++;
else
this.x--;
sleep 0.05;
}
}

__________________
Thanks,
-KJL

Last edited by KJS; 09-23-2001 at 05:22 AM..
Reply With Quote