func_breakable_surf versus a ragdoll

  • Thread starter Thread starter Bad_Llama123
  • Start date Start date
B

Bad_Llama123

Guest
I'm trying to make a map where a combine soldier is shot off the edge of a skyscraper, falling into a glass roof below and shattering the glass in the process.

I'm using a func_breakable_surf as the glass and the glass itself works fine. However, the ragdoll body of the dead combine soldier does not break the glass at all but just bounces off it like it were a regular surface...

When I (the player) jumps from the roof the glass DOES shatter. I was wondering if there is any way to make a combine body able to shatter the glass on impact?

Thanks.
 
well you could put a thin trigger brush above the glass that triggers to break the breakable surf when physics objects touch the trigger, creating the illusion that the ragdoll breaks through.
 
Sorry, but I'm a bit new to mapping and I'm not quite sure how to do this... :o

I know how to make a trigger, but which kind of trigger? A trigger_hurt? And how would I go about setting it up to work with the falling ragdoll?

Thanks again for any help.
 
a trigger_once would do it.

just put it over the top of the glass (you may have to check an option in the flags section so it works for NPCs) and set the outputs to the func_breakable_surf (which you'll obviously have to name) and there should be drop-down lists giving options like 'on break' that you need to choose (i don't have Hammer open, but i think the options you need to choose will be fairly self explanatory)
 
it would be a trigger_once, and in Flags you would have physics objects selected, although i dont know if physics objects entails ragdolls, because a func_clip_vphysics doesn't block ragdoll. there is no flag for a ragdoll in a triggers flags.

but there is an 'everything' flag, you might check that. but then every little thing would break the glass, like a soda can. the output for the trigger would be:

on_starttouch - target window entity name(you'll have to name the window) - and break.

maybe someone who knows more can give their input.

edit: after seeing gonzos post. hmm you could try just selecting NPC's, but i think that once an NPC dies, the ragdoll is no longer an NPC. or is it?
 
I thought it was possible to do with a ragdoll. There was a setting with the glass that allowed you to do this. I'm looking into it now.

But here is the one with the trigger. It does have its conditions though, I've made it so that when the ragdoll enters the trigger, the glass shatters at co-ordinates 0.5,0.5 (XY, the center) with a radius of 50 units. So if you want him to land at a different spot of the window, you'll have to change this. You do not have to change it when you change the size of the window however.

If you change the Fragility parameter of the glass, it determines how fragile it is and how many pieces break when it is shot/hurt.

The attachment: change the ZIP to .vmf!!! Otherwise I couldn't attach it!
 
LATE EDIT: it seems that my trigger has unexpected outcomes, the glass breaks where ever the ragdoll falls. I've got it figured out I think, the trigger tells to make the glass shatter, which 'awakes' it and when the ragdoll lands on it, it is also able to break into pieces. Without a trigger, the glass isn't 'awake' in time and the ragdoll just bounces off. I think... :hmph:

Here's a slightly updated version.

EDIT 2: You can ignore the trigger in the .vmf in front of the info_player_start, it's just a trigger that comes with the prefab in Hammer. The only stuff that matters is:

func_breakable_surf (called Glass01)
trigger_once
prop_ragdoll (called Combine91, typo :D)
env_cubemap
 
I dunno if this might work.. but try going into the Flags of your func_breakable... and check Break immediatly on physics.. or possible some of the other ones like Break on Pressure. dunno if this helps.. might save you from using Triggers.
 
Thanks for all the help guys. I couldn't open your maps PvtRyan, I changed the file extension to .vmf but Hammer refuses to recognize them as map files :rolling:

Anyways, it seems that when the flag Break on physics (or whatever it is) is checked that the dead combine does in fact "break" the glass, but he does not create a hole in it.

What I mean, is that when the combine soldier falls, the glass turns to the broken texture, but there is no hole formed where he collided. All the ragdolls seem to fall right through the glass without making holes in it... I've tried it with multiple soldiers.

On the other hand, physics props fall through and create holes without problems. I tried setting up a trigger also, but the ragdolls still fall through the glass without actually colliding with it. They change the glass' texture to broken, but they don't make a hole.

I can't think of another way to accomplish this except for making the glass break on coordinates like PvtRyan suggested... but I don't want it to break in the same spot every time...

Ah well, I guess ragdolls just weren't meant to break through glass. Thanks again for all the help. :cheers:
 
Had a go on this and it seems that the glass doesn't treat it as a solid physics object. Had various ideas of somehow converting the failing dead combine to a phy_static or somehow reading the vector coordinates as it fails and applying it to the glass shatter.

On a positive note I do now if you create a 'filter_activator_name' and on the 'filter name' put it to the combine name, then name the filter. Then in the func_breakable_surf change the 'damage filter' to your actual filter entity name. Its should only allow entities with that 'combine name' to effect it.

I think the only logical way to get round this is, instead of creating just one great big plane of glass you divide it up into several small planes of glass on a grid of steel frames, ie. 4x4 grid. Then create triggers the same amount and same size relating to the small glasses and put them above them. Apply what PvtRyan suggested about glass breaking on coordinates. This will give the illusion that the combine will only break the glass where it falls. Plus it makes it look cooler cos it should colide with the steel frames. Do you get it?
 
What my trigger did is as soon as the ragdoll entered it, it did 1 damage on the co-ordinates 0.5;0.5, which 'awoke' the glass, but didn't create a hole. And as soon as the ragdoll touched the glass, it created a hole itself in the glass. So it's not the same hole, but it breaks whereever you drop the ragdoll. Just like you wanted.

The .vmf attached is now really ZIPPED so you can just unzip it and it should work.

I've also attached an example movie.
 
Okay, so the problem is narrowed down but it still remains.

First off, Pvt_Ryan, thanks a lot for that sample map :thumbs: It works wonders. The only thing is that I would like the ragdoll of a former NPC to break the glass, not a prop_ragdoll from the get-go.

And just a question... how did you come up with those "parameter" settings for the trigger? It seems that when I remove them, the trigger will not work... but I have no idea where they are derived from in the first place.

So the problem is the fact that once an NPC turns into its dead, ragdoll form, it seems to lose all of it's information (such as the name I give it in Hammer).

I can make a LIVE NPC break the glass, but that looks a little silly, because they don't flail or anything when falling. I can also make a prop_ragdoll break the glass. But what I want is the player to be able to kill the NPC, turning it into its usual ragdoll, and THAT ragdoll to break the glass below.

I tried using a filter entity, which Hick$ suggested, but since the ragdoll of the former NPC doesn't seem to retain the NPC's defined name... this method doesn't work either.

It seems that this isn't possible with the engine for some reason, unless somebody has another suggestion that is...

Thanks again for all the help, you guys rock :)
 
I think I've got a solution, but I've run into some problems.

What I did: as soon as Bob (the guy you kill :E) is dead, a prop_ragdoll is spawned and he is deleted. This is practically seamless, only when he's turned around the ragdoll will spawn in the same direction, but this will seem like a minor glitch. But if he's facing the way of the ragdoll, it's seamless. I could parent the spawnpoint to Bob, but apparently, when the parent is deleted, so is the child, so the spawnpoint gets deleted.
This brings another problem: if he moves, the spawnpoint stays at the same location, spawning a ragdoll at that location, even if Bob died somewhere else across the map.

Another problem I have: the ragdoll doesn't have the momentum of the original Bob, from the gunshot, so he won't fly forward off the building, but just collapse. I tried to give him some momentum, with an env_physimpact, but I can't get it to work. He just needs a little push like he's shot.

Beware, this is VERY hacky, sometimes, the original model isn't deleted and there's suddenly 2 Bobs. :E
Dunno why that happens. So it's not perfect, but acceptable. It depends on how you're going to use it, whether or not this solution is acceptable.

Here's two example movies:
http://up1.fastuploads.info/Bob_the_Movie.zip

In Bob1 (yeah, Bob's an obsession) you can see the situation goes almost perfect, a bit glitchy. The momentum problem isn't an issue here, cause another bullet hits the ragdoll as soon as it spawns. So unless you hit him with the EXACT amount of bullets, there's always one bullet the you fire after he dies and that one hits the ragdoll and pushes him away.

Anyway, long story short: if there's anyone else that can fix up my attached .vmf, I'd love that, cause I want to know too how to do this in a better way if it's possible.
 
I think I'm just going to stick with the prop_ragdoll method and not allow the player to kill him at all. This new method is a good creative workaround, but it puts too many restrictions on Bob's ( :D ) placement.

PvtRyan, could you please explain the "parameters" from your last example? The ones that you put on the trigger_once. I can't seem to figure out where you got those numbers from.
 
I assume you mean 0.5 0.5 1?
0.5 is X, so half of the width in X, second 0.5 is Y I believe, half of the length in Y. 1 is the radius of the shatter. So it creates a hole of 1 unit (doesn't get displayed, isn't necessary) at the center. I got it from the Help file for the surf entity. I first tried Break but that just made it break HL1 style.
 
Back
Top