Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Movement troubles (https://forums.graalonline.com/forums/showthread.php?t=57367)

CaTigus 01-29-2005 06:58 PM

Movement troubles
 
I recently made a "push players" script for my server, But when you push someone too far they warp to another level of the GMAP, I know how to fix this with NPCs but not with players and the player that i'm pushing isn't frozen, Anyone know what I can do?

CaTigus 01-30-2005 07:52 AM

I'm guessing no one knows?

Skyld 01-30-2005 03:32 PM

Check if the player's X and Y is either <0 or >64.
Check the level name aswell. If your level name format follows mapname_horiz_letterverti_number.nw, then you will be able to script it to work out the level they are about to walk into, and then warp them there by triggeractioning to the serverside, and using setlevel2 to put them where they need to be.

In theory it would work, although in practise, I'm not sure how well it would perform.

Gman4pwnu 02-07-2005 06:10 AM

does your movement script use disabledefmovement?

ChibiChibiLuc 02-07-2005 10:59 PM

If you wanna be safe, limit the NPC so people can't be pushed outside the level.

Level x = (playerx)%64
Level y = (playery)%64

If the level x/level y the player will be pushed to is over 64, don't move the player.

Evil_Trunks 02-07-2005 11:22 PM

you need to provide more details on how your push system works

googleman 02-08-2005 04:43 AM

If it's a gmap wouldn't the level be *.gmap?

What chibi said should work.

Projectshifter 02-08-2005 05:28 AM

Quote:

Originally Posted by Skyld
Check if the player's X and Y is either <0 or >64.
Check the level name aswell. If your level name format follows mapname_horiz_letterverti_number.nw, then you will be able to script it to work out the level they are about to walk into, and then warp them there by triggeractioning to the serverside, and using setlevel2 to put them where they need to be.

In theory it would work, although in practise, I'm not sure how well it would perform.

You're under the assumption that levels are treated differently. If it's all inside one gmap, it is treated as a singular file assuming your gmap is done PROPERLY. Also levels go 60x60 although the editor shows something like 64x64 I believe there is a lot of overlap.


All times are GMT +2. The time now is 04:55 PM.

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