Falling Door!

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

Moderator: Moderators

User avatar
Clackinizer
Sergeant
Posts: 72
Joined: Sun Mar 16, 2003 1:49 am
Location: USA
Contact:

Falling Door!

Post 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?
........
User avatar
Zip
Major
Posts: 323
Joined: Wed Apr 09, 2003 6:47 pm
Location: Belgium

Post by Zip »

I don't understand your question! What has the func_door got to do with the spike?

:?
Zip :?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post 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.
Tom Trude,

Image
User avatar
Clackinizer
Sergeant
Posts: 72
Joined: Sun Mar 16, 2003 1:49 am
Location: USA
Contact:

Post 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?
........
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

door

Post 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.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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!!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Opps

Post by tltrude »

I stand corrected, good idea wacko.
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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.
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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).
User avatar
Sonsai
Colonel
Posts: 438
Joined: Mon Feb 17, 2003 1:40 pm
Location: Wisconsin
Contact:

Post 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?
Image
User avatar
Clackinizer
Sergeant
Posts: 72
Joined: Sun Mar 16, 2003 1:49 am
Location: USA
Contact:

Post by Clackinizer »

hehe thanks guys :D Very interesting to see pro's at work like Sonsai said! :P
........
User avatar
Clackinizer
Sergeant
Posts: 72
Joined: Sun Mar 16, 2003 1:49 am
Location: USA
Contact:

Post 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! :) :) :)
........
User avatar
Clackinizer
Sergeant
Posts: 72
Joined: Sun Mar 16, 2003 1:49 am
Location: USA
Contact:

Post by Clackinizer »

Gaaaah! The spike still goes through the ground... and the caulked top shows... how can i stop the madness!!!? <dies>
........
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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:
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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...
Last edited by wacko on Wed Jun 04, 2003 9:10 pm, edited 1 time in total.
Post Reply