Hi,
you can write a simple function to calculate this:
func linear_blend( state_in:float, from_in:float, to_in:float, from_out:float, to_out:float ):
return from_out + (to_out - from_out) * ((state_in - from_in) / (to_in - from_in))
where:
statein = the current hitpoints
fromin = the lowest hitpoints (ths hp where the character is the slowest)
toin = the highest hitpoints (the hp where the player is at full speed)
fromout = the lowest acceleration
to_out = the highest acceleration
returns the current acceleration
this will blend/return the acceleration in relation to the hitpoints