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 01-29-2005, 06:58 PM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
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?
Reply With Quote
  #2  
Old 01-30-2005, 07:52 AM
CaTigus CaTigus is offline
Scripter
Join Date: Oct 2002
Posts: 80
CaTigus is on a distinguished road
I'm guessing no one knows?
Reply With Quote
  #3  
Old 01-30-2005, 03:32 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to 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.
__________________
Skyld
Reply With Quote
  #4  
Old 02-07-2005, 06:10 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
does your movement script use disabledefmovement?
Reply With Quote
  #5  
Old 02-07-2005, 10:59 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
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.
Reply With Quote
  #6  
Old 02-07-2005, 11:22 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
you need to provide more details on how your push system works
__________________

Reply With Quote
  #7  
Old 02-08-2005, 04:43 AM
googleman googleman is offline
Registered User
googleman's Avatar
Join Date: Dec 2003
Location: Seattle, WA
Posts: 96
googleman is on a distinguished road
If it's a gmap wouldn't the level be *.gmap?

What chibi said should work.
Reply With Quote
  #8  
Old 02-08-2005, 05:28 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
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.
__________________
Who has time for life these days?
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 02:44 PM.


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