Download

How to have ONLY character shatter object? (with pics)

Hi, so I’ve been working on this for a few days and can’t figure it out. Here’s what I’m trying to do:

I’m trying to have only my character shatter walls in my game. Right now, not only does the character shatter walls, but other wall pieces also shatter other walls. So far I’ve put a tag on my character labeled “TEST” and when my wall is hit I check to see if the character’s tag is “TEST”, if it is, then apply damage. Well, this still doesn’t matter. Other wall pieces still shatter other walls.

The latest thing I did was to see if the “Other Object” that hit the wall was the same as my Character. This tests TRUE when I print it out, but still, wall pieces shatter other walls. Here’s my Blueprint:

Blueprint_graph.jpg

And here’s a SS of in game (I’m using side scroller template):

in_game.jpg

I also tried putting the wall component into “Ignore Actors” so maybe other wall components wouldn’t cause damage, but alas, this caused NO shattering at all.

So I’m super lost, can anyone help me out? I’m pretty new to Unreal 4, so maybe I’m using damage improperly? Thanks for the help!

I’ve yet to mess around with that stuff but my quick thoughts would be not to have awake on startup…or whatever it is that allows this to crumble and only turn it on when hit/a moment before from the player…
I’m sure someone will come along and help you much more than I just did but that may get you going until then…

Hey President,

Thanks for the suggestion! Though, I’m already doing that :-o So when the game starts they don’t crumble immediately. It’s just when any object hits them (whereas I just want them to crumble when the character hits them and not other flying wall pieces from other platforms.) Thanks though!

Hi derm,

Try setting the collision to custom and selecting from there what objects to ignore.

Hey Adam,

Thanks for the reply! Yeah I originally tried that. I set the wall to ignore “Destructibles”. It kind of worked…the walls didn’t shatter from other wall pieces, but then shattered wall pieces just fly through other walls and don’t bounce off. Ponder…

Maybe I’m approaching this the wrong way. How would one approach this scenario: My character has a fire weapon. He comes up to an “Ice” wall. The character then hits the ice wall. The ice wall checks to see if the damage is fire, if it is, shatter, if it isn’t (Maybe it’s an ice sword?) don’t shatter.

I know I can create a DamageType Blueprint (fire damage for instance), but I’m not exactly sure how to “apply” that damage to my character’s fire weapon. I assume that once I “apply” it to my character’s weapon, I could select “FireDamage” under “Damage Type” on a Radial Damage node?

I have yet to fully grasp all of the collision settings so maybe this won’t work, but… Could you set up simple collision in the wall BP that is turned off when the character attacks or gets close to it. That way, if a wall piece hits another wall, it bounces off that collision, but if the player attacks it then it works as intended.

I’m still in the simple experimentation stage so I’m sure there are more robust ways to do this. Damage types sound complicated to me, but might be a better option if you know what you’re doing. :slight_smile:

Hey Gooner! Yeah I saw one of the devs do that in the Third Person Blueprint tutorial series (turn on collisions at a certain point and then turn them off, bla bla), and that’s probably the best way to go. I haven’t fully grasped the collision or damageTypeBP either, I’m hoping the devs will eventually do a tutorial series on it. Thanks for the idea sir, I’m going to try and go that route and see what happens. Woo!