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 03-22-2007, 06:56 AM
EmChain EmChain is offline
Em Chain
EmChain's Avatar
Join Date: Mar 2007
Location: Ontario, Canada
Posts: 19
EmChain is an unknown quantity at this point
Send a message via MSN to EmChain
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?
Reply With Quote
  #2  
Old 03-22-2007, 07:06 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
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.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 03-22-2007, 07:14 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
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);

__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #4  
Old 03-23-2007, 08:22 AM
EmChain EmChain is offline
Em Chain
EmChain's Avatar
Join Date: Mar 2007
Location: Ontario, Canada
Posts: 19
EmChain is an unknown quantity at this point
Send a message via MSN to EmChain
yes I wanted to warp inside the level. I found it, but was giving me problems. Sometimes it wouldn't warp and such.
Reply With Quote
  #5  
Old 03-23-2007, 08:34 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
I'd suggest a class if you're making alot of these, if you ever wanted to add anything.
Reply With Quote
  #6  
Old 03-23-2007, 12:29 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by EmChain View Post
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
__________________
What signature? I see no signature?
Reply With Quote
  #7  
Old 03-23-2007, 05:32 PM
EmChain EmChain is offline
Em Chain
EmChain's Avatar
Join Date: Mar 2007
Location: Ontario, Canada
Posts: 19
EmChain is an unknown quantity at this point
Send a message via MSN to EmChain
Ok thanks. That last code was the one I needed.
Reply With Quote
  #8  
Old 03-23-2007, 08:47 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Your welcome.

And for the rest who posted here, Please bear in mind that he's not working in GS2, but in GS1.
__________________
What signature? I see no signature?
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:19 AM.


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