Calculate subtracted value in a text object

hi, my character has a chainsaw and when it hits the enemy the hp variable is subtracted based on the collision time.
to do this I have entered this code

action:
chainsaw is in collision with enemy

action:
change the enemy’s hp variable - timedelta () +0.1

can you tell me how to calculate in a text object the variable hp subtracted by an enemy when it is hit?

Just wrap your calculation in a ToString().

You can do this in two ways if you calculate and substract from the enemy variable or if you use a custom scene variable to get the calculated damage

1 Like

thanks for your help