Projectile damage from turret

Vlaxep

Active member
Hi,

I'm using another asset's turrets to fire projectiles at my PUN Characters. I simply want to have these projectiles inflict damage upon all Characters.... How can I do this?

Vlaxep
 
I recommend setting a breakpoint within Health.Damage and then follow the callstack. This will show you the flow on both the client and master client.
 
Hi Justin, I don't have an understanding of how that all works to know what you mean.

Is there a simple component or something else I can add to a projectile so that it will apply damage to anything it hits that has a health component?

I don't need a versatile or dynamically changing system or anything, just that this particular projectile will cause 'x' amount of damage to any thing or character with Health.

Thanks.
 
With PUN especially I recommend that you have an understanding in how breakpoints work as it makes things a lot easier to debug. This is a good overview:


With that said, this page is a good overview of the health system along with the API:


However, depending on if you are on the client or master client you may need to send the health event over an RPC so it takes damage on all clients.
 
THanks Justin,

Fortunately/Unfortunately having to build that is beyond me atm.

Good thing is I've managed to have the other 3rd party asset do all the Turret tracking and movement, and it calls the Opsive 'Fire() method in the 'Turret' component. All working great!

So basically problem solved because I'm now just relying on Opsive scripts spawning Opsive Pun Projectiles and does all the pooling ETC.

Working perfectly! Cheers Justin.
 
Top