Falling Door!
Moderator: Moderators
- Clackinizer
- Sergeant
- Posts: 72
- Joined: Sun Mar 16, 2003 1:49 am
- Location: USA
- Contact:
Falling Door!
I'm making a map based in a tunnel sort of thingy... and in the middle of the map there is a spike that i want to come down when the player walks under it and instantly kill them..... so i was wondering....... how do i make a func_door open down lower?
........
script
The func_door can't go up and down, but you can script the spikes. Here is a tutorial map for a hatch that might help.
http://pages.sbcglobal.net/tltrude/Temp/door2.zip
At the start of the script (under prespawn) you will notice there are two lines that move the hatch down into its starting position and you can use that for your spikes. A script_object can crush the player, but it takes time to die that way. So, you may need to add a trigger that kills the player quickly.
http://pages.sbcglobal.net/tltrude/Temp/door2.zip
At the start of the script (under prespawn) you will notice there are two lines that move the hatch down into its starting position and you can use that for your spikes. A script_object can crush the player, but it takes time to die that way. So, you may need to add a trigger that kills the player quickly.
- Clackinizer
- Sergeant
- Posts: 72
- Joined: Sun Mar 16, 2003 1:49 am
- Location: USA
- Contact:
door
Well make it a "targeted" door and have it "start open". Then put in a trigger_multiple that targets it. I still don't think func_door will go up and down, but i will test it.
it's easy enough!
build your spike hanging above and and a brush where the player has to be to be killed.
Turn the spike into a func_door.
Press n
Select in the lower left the angle D, which gives the Func_door a key/value of angle/-2 meaning down.
check Targeted box,
enter key/value
speed/300 // speed of the spike (100 is default)
dmg/200 // how much damage is does to the player
and lip/XXX xxx must be the (height of the spike)-(way it shall move) and a last one:
targetname/spike
Then select the other brush and turn it into a trigger_multiple and give this one a key/value of target/spike
Now when the player is touching the trigger_multiple, it activates the spike and it comes down and if the player is blocking the spike, the dmg value is substracted from his health!!
build your spike hanging above and and a brush where the player has to be to be killed.
Turn the spike into a func_door.
Press n
Select in the lower left the angle D, which gives the Func_door a key/value of angle/-2 meaning down.
check Targeted box,
enter key/value
speed/300 // speed of the spike (100 is default)
dmg/200 // how much damage is does to the player
and lip/XXX xxx must be the (height of the spike)-(way it shall move) and a last one:
targetname/spike
Then select the other brush and turn it into a trigger_multiple and give this one a key/value of target/spike
Now when the player is touching the trigger_multiple, it activates the spike and it comes down and if the player is blocking the spike, the dmg value is substracted from his health!!
maybe, but the lip depends on the size of the spike and the distance:
2 examples:
a 256 units tall spike (which would normally move 256 units) starting at a height of 128 units above ground would need a lip of 128 to stop at the floor, though i would use an a little smaller lip to let the peak stick in the floor, like 120 (if there was anybody left alive to see it
)
of course, the spike could also fall deeper than it is tall! than e.g. a 256 units spike falling 512 units deep would need a lip of -256 (or, in this case, a little less to make it stick, like -264).
2 examples:
a 256 units tall spike (which would normally move 256 units) starting at a height of 128 units above ground would need a lip of 128 to stop at the floor, though i would use an a little smaller lip to let the peak stick in the floor, like 120 (if there was anybody left alive to see it
of course, the spike could also fall deeper than it is tall! than e.g. a 256 units spike falling 512 units deep would need a lip of -256 (or, in this case, a little less to make it stick, like -264).
- Clackinizer
- Sergeant
- Posts: 72
- Joined: Sun Mar 16, 2003 1:49 am
- Location: USA
- Contact:
- Clackinizer
- Sergeant
- Posts: 72
- Joined: Sun Mar 16, 2003 1:49 am
- Location: USA
- Contact:
- Clackinizer
- Sergeant
- Posts: 72
- Joined: Sun Mar 16, 2003 1:49 am
- Location: USA
- Contact:
where is the spike in it's waiting position? it should be up in the air and waiting for a fool coming to smash himClackinizer wrote:Gaaaah! The spike still goes through the ground... and the caulked top shows... how can i stop the madness!!!? <dies>
if you put it 'standing' on the floor, it will move down, but now into the ground.
once again (?), the lip is NOT the distance the func_door will move!
A lip of 0 means the func_door moves just as far as it is long (wide/high) in the moving direction.
Then a lip of MORE THAN 0 will stop the func_door EARLIER and
a lip of LESS THAN 0 (s/th negative) will stop it LATER.
Maybe you've seen a sliding door before in real life!? when it opens (i.e. slides into a slot), a little part of it will still remain outside that slot. This is the lip!
Lets say, you spike is 64x64 wide and thick and 200 (corrected) units high. It is floating in the air and there is space between its lowest part (the peak) and the floor with 128 units height,
then a lip of 0 let the brush move down 200 units (no lip makes it move as far as it is high)
a lip of 50 will let it move 200 (height) - 50 (lip) = 150 units down and
a lip of -50 will let it move 200(height) - (-50) = 250 units down.
Got it?
EDIT: the height of 256 the spike had, was wrong of course, should have been 200. sorry...
Last edited by wacko on Wed Jun 04, 2003 9:10 pm, edited 1 time in total.


