Re: move to the points of graphic
Posted: Tue Jan 18, 2022 4:59 pm
Thanks, but it doesn't solve the problem
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
your first script contains 5 (FIVE) Handlers, the second script contains 7 (SEVEN) handlersSamuele wrote: Mon Jan 17, 2022 7:16 pmI still have a version where it works.jacque wrote: Mon Jan 17, 2022 6:34 pm You said it used to work until you changed something. What did you change?
the old version that works:
the new version with a bug in the move...Code: Select all
on ActivateTimer HideStart if field "timer" > 0 then subtract 1 from field "timer" send ActivateTimer to me in 1 sec put the result into _pendingMessage else StopMoveMe #hide button "Stop" with visual effect zoom out very fast show button "Restart" with visual effect dissolve very fast show button "Info" show button "Home" show button "Settings" GameOver DisableObjects HighScore end if end ActivateTimer on HideStart if field "timer" = 1 then hide button "Start" #with visual effect zoom out very fast hide button "Stop" with visual effect zoom in very fast end if end HideStart on StopMoveMe lock screen cancel _gmoveMePendingMethodID cancel _gmoveMePendingMethodID1 cancel _gmoveMePendingMethodID2 cancel _gmoveMePendingMethodID3 end StopMoveMe on GameOver show image "GameOverSign" with visual effect dissolve slow move image "GameOverSign" to the points of graphic "Curve" in 3 seconds without waiting show graphic "GrayThing" show field "RestartInfo" end GameOver on DisableObjects disable button "minus100" disable button "doublePoints" disable button "clickMe" disable button "bonus1000" end DisableObjectsI'm sharing all the script because the problem is almost 100% here and i can't find it...Code: Select all
on ActivateTimer HideStart if field "timer" > 0 then subtract 1 from field "timer" send "ActivateTimer" to me in 1 sec put the result into _pendingMessage end if if field "timer" = 50 then show btn "Bomb" else if field "timer" = 30 then show btn "doublePoints" else if field "timer" = 20 then show btn "bonus1000" else if field "timer" = 0 then GameOver aeStopMoving "all" DisableObjects show button "Restart" #with visual effect dissolve very fast show widget "Info" show widget "Home" show widget "Settings" HighScore HideBonuses end if end ActivateTimer on HideStart if field "timer" = 1 then hide button "Start" hide button "Stop" with visual effect zoom in very fast end if end HideStart on GameOver show image "GameOverSign" move image "GameOverSign" to the points of graphic "Curve" in 3 seconds without waiting show graphic "GrayThing" show field "RestartInfo" end GameOver --this is from the animation stack-- on aeStopMoving tControl if tControl="all" then delete variable tAEEasing else delete variable tAEEasing[the long id of tControl] end if end aeStopMoving on DisableObjects disable button "minus100" disable button "doublePoints" disable button "clickMe" disable button "bonus1000" end DisableObjects on HighScore if field "userScore" > field "HighScore" of card "HomeCard" then put field "userScore" into _ghighScore put _ghighScore into field HighScore of card "HomeCard" answer "You've reached your high score!!:" & _ghighScore save this stack end if end HighScore on HideBonuses hide btn "doublePoints" hide btn "bonus1000" hide btn "Bomb" end HideBonuses
BTW that's the animation stack https://github.com/derbrill/animationEngine
Thanks!
Code: Select all
on aeStopMoving tControl
if tControl="all" then
delete variable tAEEasing
else
delete variable tAEEasing[the long id of tControl]
end if
end aeStopMovingCode: Select all
on HighScore
if field "userScore" > field "HighScore" of card "HomeCard" then
put field "userScore" into _ghighScore
put _ghighScore into field HighScore of card "HomeCard"
answer "You've reached your high score!!:" & _ghighScore
## Does nto work in a runtime!!!
save this stack
## Does nto work in a runtime!!!
end if
end HighScore