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 11-01-2001, 04:39 AM
Jerrytyrrell64 Jerrytyrrell64 is offline
Registered User
Join Date: Sep 2001
Location: never never land
Posts: 75
Jerrytyrrell64 is on a distinguished road
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
Reply With Quote
  #2  
Old 11-01-2001, 05:50 AM
wark2 wark2 is offline
Registered User
Join Date: Oct 2001
Location: Canada
Posts: 306
wark2 is on a distinguished road
Send a message via AIM to wark2 Send a message via Yahoo to wark2
Exclamation 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!
__________________
- Legend
Reply With Quote
  #3  
Old 11-01-2001, 06:09 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
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>
Reply With Quote
  #4  
Old 11-01-2001, 04:44 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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 !
Reply With Quote
  #5  
Old 11-01-2001, 05:04 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Move is very good, really smooth movement and very useful options.
Reply With Quote
  #6  
Old 11-02-2001, 08:08 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
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
Reply With Quote
  #7  
Old 11-02-2001, 08:32 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
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
Reply With Quote
  #8  
Old 11-02-2001, 12:03 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to 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.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #9  
Old 11-02-2001, 07:03 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
I use it on my playerworld when dealing with one-way moving NPCs (Not baddies/monsters)
Reply With Quote
  #10  
Old 11-02-2001, 11:05 PM
LilNiglet LilNiglet is offline
stop all the downloadin'
Join Date: Jun 2001
Posts: 3,178
LilNiglet is on a distinguished road
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
Reply With Quote
  #11  
Old 11-02-2001, 11:20 PM
PresShinP2P PresShinP2P is offline
Registered User
Join Date: Oct 2001
Location: Screw it
Posts: 84
PresShinP2P is on a distinguished road
Send a message via AIM to PresShinP2P
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
__________________
President Shinra
Reply With Quote
  #12  
Old 11-02-2001, 11:40 PM
LilNiglet LilNiglet is offline
stop all the downloadin'
Join Date: Jun 2001
Posts: 3,178
LilNiglet is on a distinguished road
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.
Reply With Quote
  #13  
Old 11-03-2001, 02:34 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
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..
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #14  
Old 11-03-2001, 03:16 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
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
Reply With Quote
  #15  
Old 11-06-2001, 03:22 AM
Jerrytyrrell64 Jerrytyrrell64 is offline
Registered User
Join Date: Sep 2001
Location: never never land
Posts: 75
Jerrytyrrell64 is on a distinguished road
bang
bang
bang


crash
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:59 AM.


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