![]() |
Movement on gmap
Hey everybody,
I have an NPC who's sole purpose is to move a player on a GMAP from y-coordinate 300 to y-coordinate 50. Straight line, nothing fancy The problem is when I get to y-coordinate 191 and around 64, the player stops moving Why is this? And any suggestions on fixing this? The NPC is a DB NPC, here is the main excerpt: PHP Code:
Thanks in advance |
The script will stop being active when the player is 3 (?) levels away. Your best bet is to put it in a weapon and have your level NPCs trigger that weapon clientside.
|
Wouldnt that method be extremely messy?
Maybe I'm not seeing the correct method for going about doing that, but that sounds very messy |
Quote:
So something like this: [ ][ ][ ] [ ][p][ ] [ ][ ][ ] So if you're on a gmap, all the boxes marked with x are 'out of range', and thus scripts and player data are no longer sent: [x][ ][ ][ ][x] [x][ ][p][ ][x] [x][ ][ ][ ][x] [x][x][x][x][x] [x][x][x][x][x] |
Quote:
PHP Code:
PHP Code:
|
You could probably make a general function and put it in a system NPC, or a class. Most servers will have a WNPC or class dedicated specifically for general functions, like math functions, that can be used between a multitude of NPCs. Add this in a global WNPC or a class that's joined to the player:
PHP Code:
|
hmm
On that subject, is the move function usable on the player object? I attempted Dusty's method for the moving, but I tried using player.move() and it wouldnt work. Is this a possible movement technique? |
Nope, sorry, move doesn't work with players(though I wouldn't object to it!). However, you should always avoid using names of available functions, whether they're intended for use with the object or not.
|
Alright. Thanks Dusty :] Rep for you <3
|
All times are GMT +2. The time now is 07:45 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.