Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   the move command (https://forums.graalonline.com/forums/showthread.php?t=15910)

Jerrytyrrell64 11-01-2001 04:39 AM

the move command
 
can anyone give me a simple examle of the move command in an npc and also I would like apretty thourough description of what it does and what you put or can put for all of the indicated things in the format for it thx alot

wark2 11-01-2001 05:50 AM

yeah
 
I knew the script when i use to be a good scripter for main.. but i forgot it, but i know what it does :
It moves the NPC side to side / up to down / with different speeds! and just with 1 command... the only other way would take too long! :
this.x=
this.y=
and everything!

Faheria_GP2 11-01-2001 06:09 AM

the move command SUCKS

get it through your head

it never needed to be hard-coded, it never should have been hard-coded and should drop dead like playersays() or <BLINK>

nyghtGT 11-01-2001 04:44 PM

Quote:

Originally posted by Faheria_GP2
the move command SUCKS

get it through your head

it never needed to be hard-coded, it never should have been hard-coded and should drop dead like playersays() or <BLINK>

then please enlighten us with something else to use ... if not shut up !

Slaktmaster 11-01-2001 05:04 PM

Move is very good, really smooth movement and very useful options.

Faheria_GP2 11-02-2001 08:08 AM

Quote:

Originally posted by nyghtGT

then please enlighten us with something else to use ... if not shut up !

okay

while (x<40 || y<40) {
if (x<40) x+=.5;
if (y<40) y+=.5;
sleep .05;
}
while (x>40 || y>40) {
if (x>40) x-=.5;
if (y>40) y-=.5;
sleep .05;
}
i would script it so it had all those geometrical features. but i am tired now

Poogle 11-02-2001 08:32 AM

Quote:

Originally posted by Faheria_GP2


okay

while (x<40 || y<40) {
if (x<40) x+=.5;
if (y<40) y+=.5;
sleep .05;
}
while (x>40 || y>40) {
if (x>40) x-=.5;
if (y>40) y-=.5;
sleep .05;
}
i would script it so it had all those geometrical features. but i am tired now

You can also try: followplayer; lol

BocoC 11-02-2001 12:03 PM

The move command is mainly used for NPC Server, because the max timeout on serverside npcs is 0.1, so you can't get a "smooth" animation without the move command.

Slaktmaster 11-02-2001 07:03 PM

I use it on my playerworld when dealing with one-way moving NPCs (Not baddies/monsters)

LilNiglet 11-02-2001 11:05 PM

Or just use a for() loop to create a moving object, thats what you had to do before move ^_^
NPC Code:

if (strequals(#c,move)){
for (i=0;i<=20;i+=1){
x += .05;
sleep .1;
}}



=D That will move an object 10 spaces down

PresShinP2P 11-02-2001 11:20 PM

Quote:

Originally posted by BocoC
The move command is mainly used for NPC Server, because the max timeout on serverside npcs is 0.1, so you can't get a "smooth" animation without the move command.
i beleive the minimum timeout is .05

LilNiglet 11-02-2001 11:40 PM

Quote:

Originally posted by PresShinP2P


i beleive the minimum timeout is .05

No, on a NPC server, it is .1. That is why the move command exists. Duh.:rolleyes:

Xaviar 11-03-2001 02:34 AM

Supersonic: Move rocks, in addition to everything else it does, it also makes your code alot more readable (Which is a big thing, for some of us *cough*)

LilNiglet: That for loop is okay, but I don't like doing it that way (especially with the sleep..) Because then it makes your NPC very "single-minded," if you understand what I mean..

Loriel 11-03-2001 03:16 AM

Also, if you do the for-loop stuff on serverside NPCs, the NPC would "jump" a lot on the client's side (which is what you actually see), even if the minimum timeout was 0.05, because the NPC repeatly sends his position information to the client, but move tells the clientside version of the NPC when to be where I guess, so the actual movement is done clientside, and the server just confirms it.
Bash me if I am wrong, not sure :(

Jerrytyrrell64 11-06-2001 03:22 AM

bang
bang
bang


crash


All times are GMT +2. The time now is 07:28 AM.

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