Welcome to tula's school of mathematics! ( <img src="smileys/smiley4.gif" border="0" align="middle"> sorry, I couldn't resist)
Always remember the formula and then think about what parts belong to what name in the formula. For example:
Sprite('dist') / TimeDelta / 80
Here we use real values and variables instead of the names in the formula. Also don't forget that we omitted 'min', because it is always 0 in this example. The formula here was just 'current / max'.
Let's first assign the real values to the names of the formula:
<font color="red">Sprite('dist') / TimeDelta</font> / <font color="blue">80</font>
where red = current, and blue = max. Now we have to add 'min' back into the formula:
(<font color="red">current</font> - min) / (<font color="blue">max</font> - min)
Replace the colored parts with the real values. You get
(<font color="red">Sprite('dist') / TimeDelta</font> - min) / (<font color="blue">80</font> - min)
Next step is to replace min by a value of your choice, for example 20 px/s:
(<font color="red">Sprite('dist') / TimeDelta</font> - 20) / (<font color="blue">80</font> - 20)
And last but not least you have to use max(a, b):
max( (<font color="red">Sprite('dist') / TimeDelta</font> - 20) / (<font color="blue">80</font> - 20), 0 )
Done <img src="smileys/smiley1.gif" border="0" align="middle">
Extended the cap again, this time using globals that match the names of the formula (like 'current', 'maximum', 'minimum' and 'relative_value'). The scale effect will not start until the sprite is 20 px/s fast (or whatever value you set the global 'minimum' to): http://db.tt/8OB13G0C