Regenerating a Shield, Not When Taking Damage.

Hi!

I’m currently learning UE4 and how all the development works. I am a student currently, however I am trying to make an active effort of learning UE4 as its such a useful engine to learn and is a lot of fun also. I have been following many tutorials for many of things such as Paper 2D and now I’m moving onto 3D worlds and other stuff. Im currently following a tutorial about an FPS sort of game.

Firstly I have created one function which takes the damage shown below:

https://forums.unrealengine.com/filedata/fetch?filedataid=155141&type=thumb

Secondly I have created a Tick Event to regenerate the armour which is shown below:

https://forums.unrealengine.com/filedata/fetch?filedataid=155142&type=thumb

Finally I have created a object with collision box to replicate damage, when collision is true, take damage:

https://forums.unrealengine.com/filedata/fetch?filedataid=155143&type=thumb

What I am looking to do is simply whenever the collision Boolean is set to true, do not regen armour. I have tried writing regen armour as a function but I cannot seem to do it?

Thanks for the help in advance :slight_smile: