View Single Post
  #2  
Old 12-08-2011, 12:00 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
I've read the files and I can't seem to grasp exactly what you're trying to achieve. Is it an item players can warp to specific levels with or is it a custom warp system when you touch an object or something? If you want a simple GUI to warp with, just create the GUI window with a button and add an array to the control to determine the level, x and y to warp to.
Example: warp = {"levelname",x,y};

After that, when the player clicks the GUI button send the information to the server and set the players level. That's what I would do anyway. I've tested it and it works. I'm sure there's a better way to do it though :P

If it's a custom door warp or something like that, just create a class to join to the object...
PHP Code:
//class WARP
function Warp(level,x,y) {
  
setlevel2(level,x,y);

the in the object...
PHP Code:
//level NPC
join("warp");
function 
onPlayerTouchsMe() {
  
warp("levelname.nw",30,30);

We used to use this on Lexia so I could add a sound to the doors while warping.
Reply With Quote