Page 1 of 2

Falling Door!

Posted: Tue Jun 03, 2003 6:04 pm
by Clackinizer
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?

Posted: Tue Jun 03, 2003 6:49 pm
by Zip
I don't understand your question! What has the func_door got to do with the spike?

:?

script

Posted: Tue Jun 03, 2003 7:38 pm
by tltrude
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.

Posted: Wed Jun 04, 2003 12:44 am
by Clackinizer
no no no!! lol , i gave it the func_door because it's the only door for going up or down(you know... press the d thingy and it goes down... pres the "u" and it goes up)! And it can auto-open when the play walks under it just like the rotating door! Does that make it more clear?

door

Posted: Wed Jun 04, 2003 4:56 am
by tltrude
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.

Posted: Wed Jun 04, 2003 6:32 am
by wacko
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!!

Opps

Posted: Wed Jun 04, 2003 9:53 am
by tltrude
I stand corrected, good idea wacko.

Posted: Wed Jun 04, 2003 10:37 am
by jv_map
I think lip should be 0 in this case, since the move distance is equal to the dimension of the spike (along the axis of movement) minus the lip value. Thus, if you want the spike to hit the ground you'd need a lip of 0. A negative lip value will make it go through the ground.

Posted: Wed Jun 04, 2003 11:13 am
by wacko
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 :wink: )

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).

Posted: Wed Jun 04, 2003 12:01 pm
by Sonsai
:: stares at all the pros working ::

dang clackinizer, u drag a crowd :P

i'm learning from this one! but... dont you apply the lip and damage to the dagger thing not the door?

Posted: Wed Jun 04, 2003 2:39 pm
by Clackinizer
hehe thanks guys :D Very interesting to see pro's at work like Sonsai said! :P

Posted: Wed Jun 04, 2003 3:34 pm
by Clackinizer
Hey! It worked! But i am still having problems with the lip, sometimes it goes through the ground and other times it doesn't... so i measured the units between the spike and the ground and made them equal... I'm going to test it right now with the lip of 0! :) :) :)

Posted: Wed Jun 04, 2003 4:21 pm
by Clackinizer
Gaaaah! The spike still goes through the ground... and the caulked top shows... how can i stop the madness!!!? <dies>

Posted: Wed Jun 04, 2003 4:28 pm
by wacko
Sonsai wrote:dont you apply the lip and damage to the dagger thing not the door?
the dagger is the spike is the func_door is the brush (object) that shall fall down :wink:

Posted: Wed Jun 04, 2003 4:49 pm
by wacko
Clackinizer wrote:Gaaaah! The spike still goes through the ground... and the caulked top shows... how can i stop the madness!!!? <dies>
where is the spike in it's waiting position? it should be up in the air and waiting for a fool coming to smash him :wink:
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...