Sound pitch expression?

3absh3absh Member Posts: 601

Hey guys,
I have some enemies that when hit produce a sound that is dependant on their HP level, the higher the HP of the enemy the lower the pitch.

I want to make the pitch not go any lower than 0.5 no matter how high the HP
I was going to make an attribute Max HP and then use this formula
1-0.5*CurrentHP/MaxHP

but I though it isn't worth it make a new attribute just for the sound pitch, I already have tons of attributes.
Is there any other way around this?

Comments

Sign In or Register to comment.