Rotating Door Upwards ?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
*GCC*Nigel
Second Lieutenant
Posts: 169
Joined: Sun Dec 04, 2005 5:13 am

Rotating Door Upwards ?

Post by *GCC*Nigel »

I tried to make a func_rotating door open upwards, like the foot rest on a reclining chair, but it didn't work. I looked at tltrude's door map, and couldn't find the type I was looking for. If it is possible to do, can you then get it to launch a player as well?
Stein Auf
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Cannon

Post by tltrude »

My "explodingdoor" tutorial map has a cannon that shoots players into the air.

Image

Also, there is a manhole elevator, in the doo2 map, that is made from a func_door. If you set the time lower (0.2) and stood on top, it would probably launch you into the air.

http://gronnevik.se/rjukan/index.php?n= ... veElevator
Image

You can also change the speed of the trap door. But, you have to use the script because func type doors will not rotate up or down.
Last edited by tltrude on Mon Apr 30, 2007 2:43 am, edited 1 time in total.
Tom Trude,

Image
*GCC*Nigel
Second Lieutenant
Posts: 169
Joined: Sun Dec 04, 2005 5:13 am

Post by *GCC*Nigel »

So I can't make something like the trapdoor up from the kitchen in Door2, but going the other way? It's not necessary that it launches the player, but it'd sure be cool if it did...
Stein Auf
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

trap door

Post by tltrude »

To make it go the other way, just move the red "origin" textured brush to the other side. The origin brush is the hinge point of the script_object door.

It is not a func_door, its a script_object entity with a targetname and a trigger. When a player uses the trigger, a thread in the script rotates the door entity around its origin -- the center of the origin brush.

Here are all the script lines that make the trap door work.

//=============================================

main:

level waitTill prespawn

$trap_door movedown 64 // door moved up for lighting edges
$trap_door move

thread trap_door_mover // start the thread named "trap_door_mover".

level waittill spawn

end

//------------------------------------------
// trap_door
//------------------------------------------

trap_door_mover:

$trap_door_trigger waittill trigger // script waits until a player uses the trigger.
$trap_door time 2 // time it takes to open or close in seconds ( can be a fraction of a second, like 0.2).
$trap_door playsound ("door_wood_open_move" + (randomint(3) + 1))
$trap_door rotateXup 90 // rotate the door up 90 degrees on the x axis.
$trap_door waitmove // script wait here until it has moved.
$trap_door playsound door_wood_open_stop
wait 20 // seconds
$trap_door playsound ("door_wood_close_move" + (randomint(1) + 1))
$trap_door rotateXdown 90 // rotate the door down 90 degrees on the x axis
$trap_door waitmove // script wait here until it has moved
$trap_door playsound ("door_wood_close_stop" + (randomint(2) + 1))

goto trap_door_mover // go back to the start of the thread and wait for another trigger event

end

//=============================================

Note: If you change the speed (time), the sounds will not work right because they take 2 seconds to play. But, there are other sounds you can use.
Tom Trude,

Image
*GCC*Nigel
Second Lieutenant
Posts: 169
Joined: Sun Dec 04, 2005 5:13 am

Post by *GCC*Nigel »

Just an add on thought, how did the door on the axis side of malta work? It's the kind of Thing I was trying to do. It opened upwards trapdoor-like. The thing I need needs the origin rotated 90 degreese so the door ends up horizontal starting vertical (downwards).
Stein Auf
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Like tltrude said you can't do that with a door . func rotatingdoors only rotate on the yaw axis and func doors only slide up,down,left or right , the only way to do what you want is to make a script object by making two brushes one of which has the origin texture on it and then making them a script object then using rotation commands .
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Malta

Post by tltrude »

Sorry, I don't have Spearhead installed. If I did, I would look at the script for Malta to see if it is a scripted trapdoor -- it might be a "gag" or "global" script.
Tom Trude,

Image
*GCC*Nigel
Second Lieutenant
Posts: 169
Joined: Sun Dec 04, 2005 5:13 am

Post by *GCC*Nigel »

I looked at it and it's nearly identical to yours except the move down is only 8. The origin on your door does not reach both ends, is there a reason for that? I tried a door with the hindge down, even with the door, and the hindge is unrealistic, which I understand, but why is it shorter?
Stein Auf
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

origin

Post by tltrude »

The center point of the origin brush is used to change the origin point of the door brush. So, the shape of the origin brush does not matter -- only its center point matters.
Tom Trude,

Image
Post Reply