Page 1 of 1

Door question that i saw in malta map

Posted: Fri Dec 20, 2002 6:36 pm
by =Sgt. Daniel R. O*Neil=
I was coming down the stairs when i saw a door open upward from the ground. THATS COOL !! How do you do this? I tried shoving origin off to oneside while looking in a different view and i tried different angles. None of them seemed to do the trick. Any ideas? :idea:

Posted: Fri Dec 20, 2002 6:58 pm
by jv_map
Use a func_door with angle -1 (up, -2 is down). Design the door in a closed position.

The door will open if you walk close enough or shoot at it.

You may also target a trigger to the door, it won't respond to damage anymore if you do this.

Door openning upwards

Posted: Mon Jan 27, 2003 12:28 am
by bobo
I tried to do this with a square panel on the ceiling to go to the attic using a latter. When I use func_door with the angle -1 (up) it only budges a bit like its going to open, but stops and the sound plays through.

I tried placing my origin at different places, i tried not using origin at all and to no success. i also tried all of the above with the rotatingdoor function and no luck there also.

Any one knows what I'm doing wrong?

Posted: Mon Jan 27, 2003 6:38 am
by jv_map
Hmm the door should move up its own dimensions minus its lip value.

How tall is your door?

size of door

Posted: Mon Jan 27, 2003 7:09 pm
by bobo
the panel is 16 wide X 32 long.

what is this about calculating dimention?

actually if you want you can download the prefab at
http://www.alliedassault.us go in the prefab area and download the mansion. I gave up on it and left it at 90 deg. with the func_door.

Posted: Tue Jan 28, 2003 8:35 am
by TheStorm
Are you sure that the door you are talking about in Malta isn't a scripted door? The func for doors in mohaa doesn't work as some other games, like in RTCW where you can make a hatch using the func, that's not possible in mohaa, you must script it.

Posted: Tue Jan 28, 2003 8:41 am
by jv_map
Well easy to find out, look at the script :D

Only don't have Spearhead demo anymore :(.

I recycled it :roll:

Posted: Tue Jan 28, 2003 8:45 am
by mohaa_rox
Recycle? As in delete?

Posted: Tue Jan 28, 2003 8:56 am
by TheStorm
This is from Malta, and I don't think it's the large metal gate that you can open and close (there is some other scripting for that) but I'm not sure

trapdoor_init:
self solid
self damage 0
level.trapdoor_state = 0
trapdoor_loop_start:
self waittill use
if (level.trapdoor_state == 0)
{
self thread trapdoor_open
}
else if (level.trapdoor_state == 1)
{
self thread trapdoor_close
}
goto trapdoor_loop_start
end

trapdoor_cycle local.duration:
wait local.duration
if (level.trapdoor_state == 1)
{
self thread trapdoor_close
}
end

trapdoor_open:
level.trapdoor_state = 1
self openportal
self playsound gate_wood_open_move
self rotatezupto 90
self time 1
self waitmove
self playsound gate_wood_open_stop
self thread trapdoor_cycle 15

end

trapdoor_close:
self playsound gate_wood_close_move
level.trapdoor_state = 0
self rotatezdownto 0
self time 1
self waitmove
self playsound gate_wood_close_stop
self closeportal
end

association

Posted: Tue Jan 28, 2003 1:02 pm
by bobo
I guess I would put Targetname = trapdoor or something like that to associate it with the script?

thanks for your time people

Posted: Tue Jan 28, 2003 1:56 pm
by TheStorm
This is from the :twisted: Malta (converted) map file...so you're right, trapdoor it should be!!

// Entity #2
{
"origin" "-2056 -2480 -1392"
"classname" "script_object"
"$targetname" "trapdoor"

Posted: Tue Jan 28, 2003 3:54 pm
by jv_map
Oops I thought you meant the large metal gate near the bridge that slides up or down if you press the button. :oops: