Door Problems

Posted By: fallenleaf

Door Problems - 05/15/06 16:39

Hi, I'm trying to find a simple door script to use. I've tried using the Door01 script and followed the simple instructions through several times to try to get it to work, and it doesn't. The tutorial i've using used the A5_template base script, and i of course am using the A6_template script, so i don't know if thats the issue. Any help would be greatly appreciated.
I've verified the default 'action' button should be Control, but it doesn't seem to activate the door. I saved and compiled the door as a seperate file, loaded it in my game as a Map-Entity, loaded the Door01 script and attached it to the door and is just doesn't work.
Posted By: farshad_h

Re: Door Problems - 05/16/06 18:02

Hi, this code is very simple , use this:

function scan_me()
{
temp.pan = 180;
temp.tilt = 180;
temp.z = 100;
scan_entity(player.x, temp);
}


on_space = scan_me;
//////////////////////
function operater()
{
if(my.skill1 <= 0)
{
snd_play(door_open_snd, 200, 0);//your sound
while(my.skill1 < 90)//opening the door
{
my.pan -= 6*time;
my.skill1 += 6*time;
wait(1);
}
my.skill1 = 90;
}
else
{

while(my.skill1 > 0)//closeing the door
{
my.skill1 -= 6*time;
my.pan += 6*time;
wait(1);
}
wait(4);
snd_play(door_close_snd, 200, 0);
my.skill1 = 0;
}
}
///////////////////////////
action door_rotate//attach to the door
{
my.enable_scan = on;
my.event = operater;
}
//////////////////////////

Another door(sliding):
//////////////////////////
function func_door()
{

if(my.skill1 <= 0)
{
while(my.skill1 < 90)
{
my.skill1 += 6*time;
my.y -= 6*time;
wait(1);
}
my.skill1 = 90;

}
else
{
while(my.skill1 > 0)
{
my.skill1 -= 6*time;
my.y += 6*time;
wait(1);
}
my.skill1 = 0;
}
wait(3);
}
Posted By: MentalAbyss

Re: Door Problems - 05/17/06 03:00

If you would like some more versatile door code that allows you to use triggers and panels to control your doors as well as the option to have them scan or impact controlled. Then you might consider this module on GameKnack.

www.gameknack.com/cgi-bin/itembrowse.cgi?item_number=MOD6&category=module&subcategory=Map_Entities

It offers many great configurations for most door and simple mover needs.
Posted By: FeiHongJr

Re: Door Problems - 05/17/06 05:43

hehe this reminded me of one of my very first contributions tho I guess no one else liked it cause I didnt get any replies *tears* anyways ran a search and found it... Yea that search button really does work

Prolly not what your lookin for but what the hey

EDIT: OMG I made that post 2 years and two days ago has it really been that long jeesh how the time flies.
© 2024 lite-C Forums