pulp-to-lua
pulp-to-lua copied to clipboard
Playing an animation never ends
I believe this is what is happening. I have this code in the player script that is called when an enemy is able to attack the player.
on playerHit do
ignore
gameIgnored = 1
playerFrame += 1
sound "death"
play "die" then
if playerFrame>3 then
fin "Game over"
else
tell 12,12 to
swap "white"
end
goto 12,12
play "player"
tell event.player to
frame playerFrame
end
gameIgnored = 0
listen
end
end
end
In the Pulp browser simulator, it does what I expect, which is play the 6 or so frames for the animation, then do the rest of the code to move the player back to the start position. In the compiled Simulator though, the animation is played over and over, and never moves on. The rest of the game is continuing at the same time.