move to the points of graphic
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: move to the points of graphic
Hi Samuele,
and throws an error at both lines with "delete variable..."
Maybe ->tAEEasing is neither LOCAL nor GLOBAL?
And this (save tis stack) will not work in a runtime, the script will actually STOP at that point and not execute what comes after that line!
And please explain what does NOT work as exspected, I could not tell from your video!?
Best
Klaus
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.
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 DisableObjects
I'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!
and throws an error at both lines with "delete variable..."
Maybe ->tAEEasing is neither LOCAL nor GLOBAL?
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 aeStopMoving
Code: 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
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 7235
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: move to the points of graphic
@klaus I think you need the AE library to avoid the errors. If I remember right, Samuele is using a splash stack for the app, so the real mainstack should save okay.
If it were mine, I'd go back to the working script and add commands one at a time until I see what breaks it.
If it were mine, I'd go back to the working script and add commands one at a time until I see what breaks it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: move to the points of graphic
Ah, OK, I see, sorry...