Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-23-2001, 05:09 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
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
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #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
  #3  
Old 09-23-2001, 05:22 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
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
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:39 PM.


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