subtract, less than equal to, and other math functions do not work in bluepritnts

I can not use subtract functions when trying to lower the health of an enemy that gets shot, or use less than or equal to function. The green circle that is supposed to be filled in when connecting the wire does not fill in, but it does connect.
image
image

You’ll have to get the health variable of the enemy to modify it.
But since that health variable is a variable you created inside the enemy blueprint you created(I assume) you’ll have to cast to it to gain access to it since a basic Actor class doesn’t have that variable.

Something like this.

I think you could also try utilizing the ApplyDamage node and EventAnyDamage
image

Hope it helps.

1 Like