Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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:

alt text

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

alt text

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!

Product Version: Not Selected
blueprint_graph.jpg (291.7 kB)
in_game.jpg (90.3 kB)
more ▼

asked Jun 17 '14 at 01:22 AM in Blueprint Scripting

avatar image

5 1 2 4

avatar image derm Jun 18 '14 at 09:37 AM

Hm, no thoughts anyone? :-(

How about this scenario (this is what I'm essentially going for): My character has an "ice" sword. He comes to a "fire" wall. He swings at the "fire" wall. The wall checks to see if the hit object is "ice", if it is, shatter...if it's not, don't do anything. I know there are DamageType blueprints, so I could make an "IceDamageBP". But I'm not sure exactly. Any suggestions on how one would approach this problem?

avatar image RyanB STAFF Jul 12 '14 at 03:48 PM

Have you disconnected the damage node entirely to verify it is not something else waking up the simulation? Ie simple physics simulation activated by the pieces hitting?

Oops I see you tried that. Have you tried breaking hit actor I to components first? It get character skelmesh component, and then get hit actor component instead of just a actor before the compare?

avatar image derm Jul 15 '14 at 01:34 AM

Yeah. They stand just fine until another piece fly's into it.

I found a work around that works I guess: I use a radial force instead and trigger it when my character collides with the wall. It works, although I still don't understand why the other way wouldn't work. Interesting...

avatar image twelveplusplus Dec 03 '16 at 12:37 AM

Try this:

right after OnComponentHit, Cast the Other Actor output to your Character. Connect the execution order from OnComponentHit->Cast->ApplyRadialDamage

If the Cast Fails, it will break the flow and nothing will happen. I use that method all the time for stuff.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first
more ▼

answered Jul 12 '14 at 04:04 PM

avatar image

186 4 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question