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 10-21-2001, 12:53 PM
spi spi is offline
mmm cookies..
spi's Avatar
Join Date: May 2001
Location: NOT CANADA
Posts: 2,769
spi is on a distinguished road
Send a message via AIM to spi Send a message via Yahoo to spi
sliding doors.

I need a sliding door script that slides over 3 tiles left. And another that slides over 3 tiles right.

I believe there was one like
NPC Code:
f (housegateopen) {
set gateisopen;
play stonemove.wav;
for (i=0; i<64; i++) {
x += 1/16;
sleep 0.05;
}
}



but i can't figure out how to get that to move exactly 3 tiles. :|
(I want the stonemove.wav to play in it, too.)
Thanks.
Reply With Quote
  #2  
Old 10-21-2001, 12:59 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Hello,
Make a Gani,
Bye.
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #3  
Old 10-21-2001, 01:09 PM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by mhermher
Hello,
Make a Gani,
Bye.
in ur quote u dont need { or } in single lined if's (just like in Delphi)
so thats dumb
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #4  
Old 10-21-2001, 01:16 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
dont use a gani
use the simple command move
it works like
move x,y,dx,dy
veeeeeeeeeeeeeeeeeeeeeeeeeeery simple
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #5  
Old 10-21-2001, 01:44 PM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
yah move in incriments of .5's
Reply With Quote
  #6  
Old 10-21-2001, 02:26 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
do like

if(playertouchsme){
timeout=.1;
}

if(timeout&&x<10){
x+=.1;
timeout=.1;
}

or something

or u can use move command which would work good or if you use what i said u should prolly use a this.mode so that it doesnt slide all the way along the wall
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 10-21-2001, 03:53 PM
wetferret1 wetferret1 is offline
Script Cow - MOOO!
wetferret1's Avatar
Join Date: Aug 2001
Location: Oregon, USA
Posts: 1,285
wetferret1 is on a distinguished road
Send a message via AIM to wetferret1
Just go buy one a "Jerry's"
__________________
[img]http://s-o.clanpages.com/wet***getlal.png[/img]
Quote:
Originally posted by Loriel
I am not corrupt, and I will ban you if you don't believe that.
(-=Wetferret IceFire=-)
Reply With Quote
  #8  
Old 10-21-2001, 04:17 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
[QUOTE]Originally posted by LiquidIce00


in ur quote u dont need { or } in single lined if's (just like in Delphi)
so thats dumb
[/QUOTE

if u use a { then u have to use a } *******
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #9  
Old 10-21-2001, 04:33 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
he meant ....

Quote:
Originally posted by mhermher
if u use a { then u have to use a } *******
Ok, first off i think he meant ... you do not have to use {} if your script looks like this:
NPC Code:

if (playerenters) show;


and secondly ... jumping to the conlclusion of granting someone ******* should take a little more evaluation then you put forth ....
Reply With Quote
  #10  
Old 10-21-2001, 10:21 PM
spi spi is offline
mmm cookies..
spi's Avatar
Join Date: May 2001
Location: NOT CANADA
Posts: 2,769
spi is on a distinguished road
Send a message via AIM to spi Send a message via Yahoo to spi
Sadly, Gastly is right.

You need to use a { when you use a ;} at the end, or else you'll get an error.
Reply With Quote
  #11  
Old 10-21-2001, 11:34 PM
Hulk Hogan Hulk Hogan is offline
Legendary Red Fish
Hulk Hogan's Avatar
Join Date: Mar 2001
Location: Western PA
Posts: 2,384
Hulk Hogan is on a distinguished road
Send a message via ICQ to Hulk Hogan Send a message via AIM to Hulk Hogan
if (created) {
show;
}

if (playertouchsme) {
play stonemove.wav;
x=x+1;
sleep .2;
x=x+1;
sleep .2;
x=x+1;
}

and

if (created) {
show;
}

if (playertouchsme) {
play stonemove.wav;
x=x-1;
sleep .2;
x=x-1;
sleep .2;
x=x-1;
}

Would that work?
__________________

The infamous red fish is back.


-aim- |
Andrew5656
-email- | [email protected]
-quote- | "You dont need a weatherman to know which way the wind blows."
"Its funny. The end of time has just begun."-Bob Dylan
Reply With Quote
  #12  
Old 10-21-2001, 11:46 PM
prozac424242 prozac424242 is offline
Registered User
prozac424242's Avatar
Join Date: May 2001
Location: Gone crazy: back soon
Posts: 356
prozac424242 is on a distinguished road
Send a message via ICQ to prozac424242 Send a message via AIM to prozac424242
even better...

here is a sliging door.

// NPC made by Prozac
//SLIDING DOOR
if (playerenters){show; this.slide=0;}

if (playertouchsme && this.slide=0) {
this.slide=1;
for (this.i=32; this.i>1; this.i--
{
setimgpart door.gif,0,0,32,this.i;
if (this.i>2){sleep .05;}
}
for (this.h=0; this.h<32; this.h++
{
setimgpart door.gif,0,0,32,this.h;
sleep .05;
}
this.slide=0;
}

except for the fll image mico-belch in the middle its
quite snazzy.
feel free to use this for anything


use http://www.figmentcode.com/cgi-bin/npc1.pl
my npc search engine of commands, liek search for img
its useful
__________________

Useful links:
Graal Stats
Client Script Functions-GS1 to GS2
Serverside Script Functions-Gscript page
Particle Engine-Player Attributes
Server Options-Admin rights-Gmaps
Quote:
Originally Posted by Admins
Thanks for developing and improving playerworlds and such
Reply With Quote
  #13  
Old 10-22-2001, 12:30 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
how bout make a animated pic of it !!!
Reply With Quote
  #14  
Old 10-22-2001, 12:35 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
never heared of programs like animation shop?
then move the pic of the door a little bit to the side in every frame
__________________
No Webhost at the moment
Reply With Quote
  #15  
Old 10-22-2001, 12:37 AM
SagaTCN SagaTCN is offline
Registered User
Join Date: Aug 2001
Location: West Michigan
Posts: 190
SagaTCN is on a distinguished road
Send a message via ICQ to SagaTCN Send a message via AIM to SagaTCN Send a message via Yahoo to SagaTCN
Make things simple and use the move command

//Door that moves 3 tiles to the left.
if(created) {
move -3,0,1,; //Format is move dx,dy,time,params
playsound stonemove.wav;
sleep 1;
move 3,0,1,;
}

You should be able to play around with that and make another door based on that script. Also, I believe there's a paramater that allows the door to move automatically in the other direction once the first movement is complete, so a sleep command wouldn't be needed. -Yin

Last edited by SagaTCN; 10-22-2001 at 12:40 AM..
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:14 PM.


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