How do I create DamageTypes + Apply Damage?

Hi,

How do I go about creating a DamageType in BluePrint?

I’m trying to apply damage from my custom projectile but nothing is happening, any ideas?

Cheers,
Jon

Hey Jonathan,

To apply the damage you will need to make sure your actor that was hit is the DamagedActor. As for the damage types that’s a bit more tricky. You will need to make a blueprint derived from DamageType. Now you’ll find that you can’t seem to reference it in any such way for the parameter on Apply Damage. This is because currently you can not reference other blueprints in blueprints; which in a future release will work. So for right now what you need to do as a workaround is to right click on the parameter and promote it to a variable. Then compile, save and click on defaults. From defaults tab you can change its default to be the derived DamageType you made.

Best Regards,

Ryan

Ah I see, thanks for the help Ryan.

I’ve decided to go for a trace instead but for some reason my trace appears behind the character and pointing up. No idea why, what do you think?

Here’s my BP inside MyController:

Cheers,
Jon

Hey Jonathan,

Not sure as to why its going up up but its behind them because the start location is the camera location not the player.

Best regards,

Ryan

Thanks Ryan, working great.

Cheers,

Jon

I did this and It completely eliminated all damage. it worked at first but then ignored everything.

Hi 2 Stooges,

If you’re having an issue can you post a new question on AnswerHub? This is an archived post from our beta of UE4 that is no longer being tracked.

Thank you!

Tim