Rotating Door Upwards ?
Moderator: Moderators
-
*GCC*Nigel
- Second Lieutenant
- Posts: 169
- Joined: Sun Dec 04, 2005 5:13 am
Rotating Door Upwards ?
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
Cannon
My "explodingdoor" tutorial map has a cannon that shoots players into the air.

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

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.

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

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.
-
*GCC*Nigel
- Second Lieutenant
- Posts: 169
- Joined: Sun Dec 04, 2005 5:13 am
trap door
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.
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.
-
*GCC*Nigel
- Second Lieutenant
- Posts: 169
- Joined: Sun Dec 04, 2005 5:13 am
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 .
Malta
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.
-
*GCC*Nigel
- Second Lieutenant
- Posts: 169
- Joined: Sun Dec 04, 2005 5:13 am
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
origin
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.
