![]() |
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
|
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! |
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> |
Quote:
|
Move is very good, really smooth movement and very useful options.
|
Quote:
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 |
Quote:
|
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 use it on my playerworld when dealing with one-way moving NPCs (Not baddies/monsters)
|
Or just use a for() loop to create a moving object, thats what you had to do before move ^_^
NPC Code: =D That will move an object 10 spaces down |
Quote:
|
Quote:
|
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.. |
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 :( |
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.