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 12-07-2011, 08:39 PM
Wr3ckless Wr3ckless is offline
Registered User
Join Date: Dec 2011
Posts: 1
Wr3ckless is on a distinguished road
Question Trouble with warp system!

Hello, i'm having trouble with my warp system.

The scripts are attached to this post.
PlayerWarp.txt is the Player's Warp Item
and warp.txt is the class that the warpring in the level is joined to.

Help would be great, because i am completely stumped as to what I did wrong :/
Attached Files
File Type: txt PlayerWarp.txt (2.0 KB, 157 views)
File Type: txt warp.txt (692 Bytes, 157 views)
Reply With Quote
  #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
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 01:28 PM.


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