Is there a way to make like a falling brush that crashes on a scientist? Created 11 months ago2023-12-31 15:26:49 UTC by Combined Combined

Created 11 months ago2023-12-31 15:26:49 UTC by Combined Combined

Posted 11 months ago2023-12-31 15:26:49 UTC Post #348377
Any help appreciated and if possible can you explain me step by step. Thanks for all the responses
Posted 11 months ago2023-12-31 21:12:14 UTC Post #348379
I think the only option is to use a func_train for the falling debris. You can set a high Damage on Crush value that will gib the scientist (or any other NPC) that is caught under it.
monster_urby monster_urbyGoldsourcerer
Posted 11 months ago2024-01-01 22:43:39 UTC Post #348381
You could use a func_train to have a box fall onto a scientist, then use env_render to make it invisible when it hits the scientist, all the while having an invisible (via env_render) func_breakable on top of the scientist that becomes visible when the func_train goes invisible, and have it trigger to break, creating crate gibs. kind of a hacky way to do it, but you could sell the effect this way.
Posted 11 months ago2024-01-02 08:43:39 UTC Post #348382
Can you explain Better? I am very new here
Posted 11 months ago2024-01-02 09:14:41 UTC Post #348383
Maybe easier for beginning would be a func_door. Put the brush where it should be at the beginning (above the sicientist), make it a func_door with a name, downwoards-direction, a 100-damage when blocked, high movement-speed and set the flags to 'start open' and 'monster cant'. Depending on the size and position you need to try out which entry in LIP works best. Set another brush close to the player, make it a trigger_once and enter the name of the func_door as target. When the player passes through it, the func_door will move down and crash the scientist.
Posted 11 months ago2024-01-02 09:45:40 UTC Post #348384
awkook's method is better done just using an invisible func_breakable (e.g. covered entirely in NULL texture), or completely replaced by a gibshooter, as it's only there to spawn gibs.

Either way, for the first step you'll use the func_train as both UrbaNebula and awkook already suggested (for how to use it, check the entity guide page UrbaNebula already linked). This will make a brush that moves any path you define for it (such as straight down in your case) and rest at the end.
If this is all you need, then no more is needed to be done.
Any step after that is for creating any secondary effects, for example the brush breaking into pieces when it hits the scientist (this is what awkook was explaining). If you wish to do this, there's at least 3 ways to trigger the effects:
  1. Timed from when the brush starts falling
  2. Using the Fire On Pass (message) key of a carefully placed path_corner
  3. Have the scientist trigger it using its Take Damage TriggerCondition
For the effects themselves, as I said earlier you could use an invisible func_breakable or a gibshooter to spawn whatever gibs you want (even from the ceiling where the brush starts falling from, to simulate it breaking from/through there). An env_render targetting the brush can be used to turn it invisible, or a trigger_relay can KillTarget it to remove it from the game, if you want your brush to "break" on collision. It's up to you to find out exactly what you want to happen and when.

1 Timed:

When you trigger the brush to start falling, have a delayed trigger for your effects. You can calculate this by measuring the distance between the brush' start position and its position when it collides with the scientist (for example 100 units). If you made it fall with a speed of 800 units/second, then the delay should be distance / speed = time. In this example, 100 / 800 = 0.125 seconds.

2 Fire On Pass:

path_corner has a Fire On Pass key that can be used to trigger something when a func_train, well, passes it. Just place it where the geometric center of the train would be when it collides with the scientist.

3 TriggerCondition:

If the scientist is never going to be hurt in any other way, you can use it's TriggerTarget key set to trigger the effects and TriggerCondition set to Take Damage (2) and it'll trigger the effects once the train starts hurting it.
Posted 11 months ago2024-01-02 17:26:28 UTC Post #348387
Thanks. You helped me!
You must be logged in to post a response.