If CUBEY#<WATERLEVEL
TranslateEntity CUBE,0,-(GRAVITY*DENSITY*CUBEVOLUME),0
endif
TranslateEntity CUBE,0,-(GRAVITY*DENSITY*CUBEVOLUME),0
endif
You need something to reduce the bob, which is why it goes forever.
I would have done it something like:
'if entity is not in the water set: TimeFromfirstHit#=1.0 'else if entity is in the water, for each loop/timeperiod set: TimeFromfirstHit#=TimeFromfirstHit#*0.8 '(the closer to 1.0 the slower to stop bobbing) if TimeFromfirstHit#<0.0001 TimeFromfirstHit#=0.0 '<-infinity catcher TranslateEntity CUBE,0, -(GRAVITY*DENSITY*CUBEVOLUME)*TimeFromfirstHit#,0
Stevies way above looks good too.