How to make custom OnImpact scripts intercept damage and do dif stuff.

Howdy,

So I'm making it so that some weapons hurt shields more than health, my thought is to use a custom event script to do the various checks and the logic i need to do when hit. however, the thing being hurt still takes damage ONTOP of whatever calcs i do. How do i get it so that my events ovveride what happens to the health component ( i shoot box with HEALTH, my script chekcs attackerObject type, then i manually apply damage), OR is that not what the events are for and i need to actually write a custom/make an adaptation of your HP script that has these sorts of checks builtinto it (check if dam is Plasma vs bullet, do X) instead of me doing in an attached script?

Much appreciated!
 
so i went ahead and just made a custom hp script and it does the job. My question does still stand tho, is that interception someething that an RegisterEvent onimpct ect thing can DO, or it is purely a "ALSO do this when this other thing happens" with no impact on the base thing happening?
 
Listening to events like OnImpact simply lets you do extra stuff when that event happens. Events generally aren't used to completely override some functionality. So you did the right thing!
 
Top