Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-30-2003, 10:08 PM
Chrisz Chrisz is offline
Registered User
Join Date: Oct 2002
Location: Lost...
Posts: 176
Chrisz is on a distinguished road
Send a message via AIM to Chrisz Send a message via Yahoo to Chrisz
Thumbs down move dx,dy,time,options;

x.x This command is STRANGE >:O

move dx,dy,time,options

time = speed / dist;

Well in graal thats not the case, something is wrong..

NPC Code:

if (created) {
this.speed = 2;
this.options = 1;
Move();
}
function Move() {
dx = int(random(-5,5)*2)/2;
dy = int(random(-5,5)*2)/2;
dist = (dx*dx+dy*dy/)^0.5;
time = this.speed/dist;
move dx,dy,time,this.options;
sleep time+0.1;
Move();
}



Nice little snippet that doesnt work properly, it either goes really slow or really fast, and it has confused Chrisz. I want the speed to work like... normal?? x.x;
__________________
-Chrisz
Reply With Quote
 


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 02:54 PM.


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