Assignment due in few hours..need help with health system!

Assignment due in few hours…

I’m working on car game here, but unfortunately I’ve lost health blueprints! and can’t remember how I made it work…its a car chase game… if player 1 (Police) hits player 2 (Get away car) then P2 will receive a hit…I need a blueprint for that and also a health re generator collision…if a player stands in that collision…the player’s health will be regenerated…any help (visual) will be much appreciated…cheers!

its actually quite simple.

for the damage you simply need to use a on hit event then cast to the class you want to damage then use the apply damage node. what this does is it runs when a hit occurs, then identify the actor you hit and decides if its a actor to damage (theres other ways as well and this isnt completely needed), and the last just applies damage. this assumes that your using the built in damage system and that you have a damage handling method (event any damage → decrement health).

as for the healing volume thats pretty simple too. create the actor which contains the volume (collision box). then on begin overlap we again cast to identify. next create a timer, set it to looping, create the event it triggers (custom event heal). this heal event will have a script which applies negative damage or does direct healing by changing the targets health. on end overlap clear and invalidate the timer.

there now its done for you. now for your real homework i want you to figure out how and why it works. then make some modifications so it works in different ways and or in different circumstances.

lol - I guess we need to split the grade he gets :wink: