A damaging, falling crate - how?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

A damaging, falling crate - how?

Postby Enjay » Wed Nov 18, 2020 4:45 pm

Can anyone suggest the best way to make a crate fall on the player and crush him?

The setup is that a 64x64x64 crate is made from a 3D floor and it is suspended from a wire in a warehouse. I want it to make it so that the crate can fall (I know how to do that - move the control sector floor and ceiling down) and if it hits the player, he will take damage (probably be killed as I think anything else could end up in weirdness).

So what's the best way to have the player take damage from the falling crate but, if the player gets out of the way quickly enough, he can dodge the crate and not take the damage?

In case it's relevant, it could be possible for the player to simply bump his head on the crate before it is triggered to fall (e.g. there is a point where it is just about possible to jump up and bash your head on the bottom of the crate) and this should not cause the player any damage.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: A damaging, falling crate - how?

Postby Darkcrafter » Wed Nov 18, 2020 6:15 pm

I came up with this, actor first stands onto a 3d floor that executes the script to make the crate fall then only if player stood exactly under that crate (another 3d floor beneath the crate) then another script executes to hurt the player.

Edit: But that 3d floor that inflicts damage raises from the void and it takes time, so the player can dodge it without getting hurt.

Btw, seems like raise and lower speeds are different and sectors lower faster, so you'd need to compensate for the activator sector to have a higher speed (cratefall2.wad)
CrateFall2.wad
You do not have the required permissions to view the files attached to this post.
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: A damaging, falling crate - how?

Postby Kappes Buur » Wed Nov 18, 2020 10:32 pm

For the life of me I cannot find the source for this example any more.
I thought that it was made, perhaps, by boris. Does somebody know for sure who the author is?

This example could easily be adapted to respond like you want:
You do not have the required permissions to view the files attached to this post.
User avatar
Kappes Buur
 
 
 
Joined: 17 Jul 2003
Location: British Columbia, Canada

Re: A damaging, falling crate - how?

Postby Enjay » Thu Nov 19, 2020 12:00 pm

Thank you kindly. Those examples do exactly the kind of thing that I'm looking for. I'll dig deeper into them to find out which method suits me best. Thanks again. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest