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-26-2004, 01:27 AM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
move is a pain!

Yes hello.

I have NO idea why move is being mean to me.
NPC Code:
move this.testx,this.testy,this.dist/this.speed,4+2+8;



When I use that, it looks like it's "warping" to you (yes, it moves to you), instead of a smooth moving. This is serverside.
(this.dist is the real distance, and this.speed is at least 1)
__________________
-Kjetil Valen
Reply With Quote
  #2  
Old 07-26-2004, 03:14 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Wrong scripting causes that, i'm not saying your scripting is wrong because i didn't see the whole code, but it always happens with problems on code, not with move. Already happened with me many times.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #3  
Old 07-26-2004, 04:04 AM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
NPC Code:

if (created) {
this.textx = x;
this.testy = y;
this.dist = 5;
this.speed = .1;
timeout = 0.05;
}
if (timeout) {
move this.testx,this.testy,this.dist/this.speed,4+2+8;
timeout = 0.05;
}



Seems to work just fine for me.
__________________
Reply With Quote
  #4  
Old 07-26-2004, 09:04 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
just use this.dist, that seems to be what I did whenever I used move

Goboom, that's not how it works, exactly. The dx and dy are vector parts, distance variables rather. It's the x distance and y distance the npc needs to move, not it's position. Upon further examination, yours only works because of the typo and the strange numbers you feed it (5 is grabbed out of thin air, you need to have the real distance)
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #5  
Old 07-26-2004, 09:10 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Did you know, that division by decimals increases the value of the number?

Nice speed there
Reply With Quote
  #6  
Old 07-26-2004, 10:52 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
EDIT: Alexander is helping me now <3
Close this or so.
__________________
-Kjetil Valen

Last edited by VeX_RaT_Boy; 07-26-2004 at 11:59 PM..
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 09:36 AM.


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