Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Sliders (https://forums.graalonline.com/forums/showthread.php?t=12615)

ownerofbabylon 09-23-2001 05:09 AM

Sliders
 
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

KJS 09-23-2001 05:19 AM

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;
}
}


ownerofbabylon 09-23-2001 05:22 AM

Re: Re: Sliders
 
Quote:

Originally posted by Kaimetsu


I would've helped you if you hadn't used such an ignorant homophobic comment.

Sorry Kai

Thanks alot KJL


All times are GMT +2. The time now is 12:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.