Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-13-2003, 01:47 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Sleep...

Well, I am scripting a baddie for Oasis and Konidias said he doesn't want sleep in it. And I can not figure out howto do this some other way...

NPC Code:

function doSword()
{
if(abs(this.dx)<=2.3&&abs(this.dy)<=2.3){
checkDir();
setcharani sword,;
sleep.5;
}
}



I can't figure out some other method of waiting...
__________________
new account: Trevor
Reply With Quote
  #2  
Old 01-13-2003, 01:52 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
The function is going in a timeout loop and it doesn't seem to work properly.
__________________
new account: Trevor
Reply With Quote
  #3  
Old 01-13-2003, 02:00 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
I see. I'm pretty sure I know what you mean. I think it is the same thing I am doing with the amount of steps the baddie takes before changeing directions...

Thanks Kai
__________________
new account: Trevor
Reply With Quote
  #4  
Old 01-13-2003, 03:57 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Why do you check if the absolute value of this.dx/dy is less than 2.3?
__________________
[signature]insert here[/signature]
Reply With Quote
  #5  
Old 01-13-2003, 04:29 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by screen_name
Why do you check if the absolute value of this.dx/dy is less than 2.3?
Why does it matter to what I posted?

It has something to do with the rest of the script....
__________________
new account: Trevor
Reply With Quote
  #6  
Old 01-13-2003, 08:46 AM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
Shizzam! lol

Wouldn't it be easier to just use sleep? Or is it not just his personal preference
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #7  
Old 01-13-2003, 03:51 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by tlf288


Why does it matter to what I posted?

It has something to do with the rest of the script....
Nevermind me, for some odd reason I thought that abs() trunicated the decimal, but that's int(). Sorry.
__________________
[signature]insert here[/signature]
Reply With Quote
Reply


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:02 AM.


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