Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Need A script HELP! (https://forums.graalonline.com/forums/showthread.php?t=14143)

Stefan_3 10-08-2001 02:32 PM

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 :D :D :D

Knightoffrost 10-08-2001 02:40 PM

[ 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
:D

Stefan_3 10-08-2001 02:42 PM

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
:D

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

Knightoffrost 10-08-2001 02:56 PM

[ 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;
}
}


AlexH 10-08-2001 11:18 PM

do not use a gani
use ther simple command
move x,y,dx,dy

AlexH 10-08-2001 11:27 PM

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

AlexH 10-08-2001 11:39 PM

aww ok you win :(

Enigma_GP6 10-09-2001 05:53 AM

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

btedji 10-09-2001 06:21 AM

use the debugger in the tutorial levels house

Knightoffrost 10-10-2001 03:47 PM

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.


All times are GMT +2. The time now is 10:04 AM.

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