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-08-2001, 02:32 PM
Stefan_3 Stefan_3 is offline
Registered User
Join Date: Oct 2001
Posts: 25
Stefan_3 is on a distinguished road
Unhappy Need A script HELP!

OK I am tinkering with my level editing skills I can design really nice levels but my scripting lacks and that is a part of level editing SO to get to the point I need the script to make a door like the one in training that slides if anyone could help I would be greatfully greatful
__________________
Reply With Quote
  #2  
Old 10-08-2001, 02:40 PM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
[ Delph Inc. ]

Oh my god!
I would thought to have never seen such a thing...Stefan asking for help to script a door.
I think you should ask your other personality...I think it would be much easier.

But for the time being:

NPC Code:

if (created) show;
if (playertouchsme) {
hide;
timeout=1;
}
if (timeout) show;



I'm not even sure if that works I haven't scripted one in ages
__________________
Xerphier Dintch
Featuring
Reply With Quote
  #3  
Old 10-08-2001, 02:42 PM
Stefan_3 Stefan_3 is offline
Registered User
Join Date: Oct 2001
Posts: 25
Stefan_3 is on a distinguished road
Quote:
Originally posted by Knightoffrost
[ Delph Inc. ]

Oh my god!
I would thought to have never seen such a thing...Stefan asking for help to script a door.
I think you should ask your other personality...I think it would be much easier.

But for the time being:

NPC Code:

if (created) show;
if (playertouchsme) {
hide;
timeout=1;
}
if (timeout) show;



I'm not even sure if that works I haven't scripted one in ages
hate to burst your bubble get real tired and be up at 4 am and try to come up with a better accountname and I mean the sliding door not the one that just dissapears, the one when you drop 5g it slides out of the way
__________________
Reply With Quote
  #4  
Old 10-08-2001, 02:56 PM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
[ Delph Inc. ]

Here's the code which was used in the exe

This part is placed in the Unixmad character:
NPC Code:

if (playerlaysitem) {
while (itemscount>0) take2 0;
if (rupees>=5) {
for (i=0; i<npcscount; i++) callnpc i,housegateopen;
}
}



This is in the gate:

NPC Code:

if (housegateopen) {
set gateisopen;
play stonemove.wav;
for (i=0; i<64; i++) {
x += 1/16;
sleep 0.05;
}
}

__________________
Xerphier Dintch
Featuring
Reply With Quote
  #5  
Old 10-08-2001, 11:18 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
do not use a gani
use ther simple command
move x,y,dx,dy
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #6  
Old 10-08-2001, 11:27 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
suppose
but if you made set a flag while it was moving and only allow the moving to work if the flag was unset this should solve the problem
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #7  
Old 10-08-2001, 11:39 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
aww ok you win
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #8  
Old 10-09-2001, 05:53 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
Quote:
Originally posted by Kaimetsu
Though that does open the way for an amusing bug. Use a gani.
For those of you who don't notice the bug, this is basicaly what happens, (This also happens in the tutorial level, check it out!)
When you drop the money, it moves (DUH), but you lay more money, and it moves farther, and farther, untill you can't even possibly see it. Like Kai says, use a gani, or have it move back after the player goes through.

-Rebel95
Reply With Quote
  #9  
Old 10-09-2001, 06:21 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
use the debugger in the tutorial levels house
Reply With Quote
  #10  
Old 10-10-2001, 03:47 PM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
Quote:
Originally posted by Enigma_GP6


For those of you who don't notice the bug, this is basicaly what happens, (This also happens in the tutorial level, check it out!)
When you drop the money, it moves (DUH), but you lay more money, and it moves farther, and farther, untill you can't even possibly see it. Like Kai says, use a gani, or have it move back after the player goes through.

-Rebel95
[ Delph Inc. ]

All you have to add then is:

if (playerlaysitem&&x in |20,25|)

I'm not sure of the exact value but you can change it to fit easily.
__________________
Xerphier Dintch
Featuring
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 06:18 PM.


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