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 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
  #2  
Old 07-30-2003, 10:49 PM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Re: move dx,dy,time,options;

Quote:
Originally posted by Chrisz

time = speed / dist;
Silly Chrisz, isn't time distance devided my speed o.O
Reply With Quote
  #3  
Old 07-30-2003, 11:01 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Re: Re: move dx,dy,time,options;

Quote:
Originally posted by Alexander


isn't time distance devided my speed o.O
Yes, it is.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #4  
Old 07-31-2003, 12:34 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 don't think anyone has really put any good use into the command move other than the Kingdoms furniture movement system. Atleast, that is the only thing I have saw that uses it well.
__________________
new account: Trevor
Reply With Quote
  #5  
Old 07-31-2003, 12:35 AM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by tlf288
I don't think anyone has really put any good use into the command move other than the Kingdoms furniture movement system. Atleast, that is the only thing I have saw that uses it well.
Uh...you mean...2k1's villa furniture movement system...

2k2's just warps it to the new location when you move it with the mouse...
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #6  
Old 07-31-2003, 01: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
Quote:
Originally posted by Tseng


Uh...you mean...2k1's villa furniture movement system...
Never seen it .


Quote:

2k2's just warps it to the new location when you move it with the mouse...
It sures looks like it uses move to me. But then again, I haven't seen it since it was first realesed considering I never play Kingdoms. Are you sure about what you said Tseng? I can almost remember it perfectly, but I could be wrong.
__________________
new account: Trevor
Reply With Quote
  #7  
Old 07-31-2003, 01:05 AM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by tlf288
It sures looks like it uses move to me. But then again, I haven't seen it since it was first realesed considering I never play Kingdoms. Are you sure about what you said Tseng? I can almost remember it perfectly, but I could be wrong.
Um, I'm moving furniture around right now. It warps it.

2k1's uses the move command.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #8  
Old 07-31-2003, 03:04 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
move is pretty useful, and still, time is distance divided by speed. Otherwise, you would arrive earlier if you travelled farther.
Reply With Quote
  #9  
Old 07-31-2003, 04:25 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 Tseng


Um, I'm moving furniture around right now. It warps it.
Then it used to use the move command. I am almost 100% sure it did.
__________________
new account: Trevor
Reply With Quote
  #10  
Old 07-31-2003, 07:25 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
Quote:
Originally posted by tlf288


Then it used to use the move command. I am almost 100% sure it did.
Why on earth would you use the move command when it just reloactes it? Move is not used and if it were, it isn't necessary.
__________________
[signature]insert here[/signature]
Reply With Quote
  #11  
Old 07-31-2003, 07:27 AM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by screen_name


Why on earth would you use the move command when it just reloactes it? Move is not used and if it were, it isn't necessary.
The 2k1 villa system uses move...it adds a nice effect.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #12  
Old 07-31-2003, 07:36 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 on earth would you use the move command when it just reloactes it? Move is not used and if it were, it isn't necessary.
Because it looks cool, dude.
__________________
new account: Trevor
Reply With Quote
  #13  
Old 07-31-2003, 07:43 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Just to show off a little


I think Stefan was very clever in his design of move options, showstats and other similar functions. He relied on the linear independance of x,x^2,...x^n to guarantee that no matter what combination of options you choose, you never get two that have the same sum.

Props also to Kai, for I recall he used the same property for one of his scripts.
__________________


Help me keep scripting
Reply With Quote
  #14  
Old 07-31-2003, 07:52 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by TribulationStaff
Props also to Kai, for I recall he used the same property for one of his scripts.
It's pretty fundamental thing in Computer Science, of course. The move options are equivalent to a one-byte flag with individual bits representing different options (though the concept is clearer in enablefeatures).
__________________
Reply With Quote
  #15  
Old 07-31-2003, 08:00 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
I suppopse it would be, but to a mathematician, its something you don't see until late sophomore or early junior year.
__________________


Help me keep scripting
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 11:06 AM.


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