Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Door Warp (https://forums.graalonline.com/forums/showthread.php?t=72989)

EmChain 03-22-2007 06:56 AM

Door Warp
 
How do I make a warp in a door? The NPC one thats pre-defined isn't working.

Can someone give me the script please?

napo_p2p 03-22-2007 07:06 AM

I get the impression that what you really want in a level link. Highlight an area of the level where you want the link, and you'll see a blue arrow in the toolbar. Click on that and it'll let you add a level link.

killerogue 03-22-2007 07:14 AM

But if he wants a script to warp a player elsewhere:

Depends on the situation and has a small delay.

PHP Code:

function onCreated() {

    
setimg("door");
    
setshape(1,32,32);
}

function 
onActionTouch() {

    
setlevel2(levelname,newx,newy);
}

//#CLIENTSIDE

function onPlayerTouchesMe() {

    
triggeraction(this.x,this.y,"touch","touch");



No delay at all:

PHP Code:

function onCreated() {

    
setimg("door");
    
setshape(1,32,32);
}

function 
onPlayerTouchesMe() {

    
setlevel2(levelname,newx,newy);



EmChain 03-23-2007 08:22 AM

yes I wanted to warp inside the level. I found it, but was giving me problems. Sometimes it wouldn't warp and such.

Chandler 03-23-2007 08:34 AM

I'd suggest a class if you're making alot of these, if you ever wanted to add anything.

godofwarares 03-23-2007 12:29 PM

Quote:

Originally Posted by EmChain (Post 1291615)
How do I make a warp in a door? The NPC one thats pre-defined isn't working.

Can someone give me the script please?

Try this:

PHP Code:

if (created)
{
     
setimg door.png;
     
setshape 13232;
}

if (
playertouchsme)
{
     
setlevel2 (levelname), (x), (y);


Replace (levelname), (x), and (y) with the level, x and y coordinates respectively.

Simply done >_<

EmChain 03-23-2007 05:32 PM

Ok thanks. That last code was the one I needed.

godofwarares 03-23-2007 08:47 PM

Your welcome.

And for the rest who posted here, Please bear in mind that he's not working in GS2, but in GS1.


All times are GMT +2. The time now is 07:31 AM.

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