Topic: Health Bar (script)
Finally got this Health Bar script finished and neat:
box = getObject("box")
ground = getObject("ground")
bar = getObject("bar")
lastFrame=60
firstFrame=3
function onSceneUpdate()
    setCurrentFrame(bar,lastFrame)
    
    if isCollisionBetween(box,ground) then
        lastFrame = lastFrame - 1
    end
    
    if lastFrame <= firstFrame then
        lastFrame = firstFrame
    end
end
Wondering, however, how I would get the setAnimationSpeed() function to work with this. I can't quite place it. I could use a little help.
Last edited by Tutorial Doctor (2013-08-20 00:54:23)