I am now confused. It only stops when you close the stack or quit LC? That seems like expected behavior to me. Please tell me exactly what you want it to do.And no, it only stops whenever I close the stack or/and livecode.
Craig
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
I am now confused. It only stops when you close the stack or quit LC? That seems like expected behavior to me. Please tell me exactly what you want it to do.And no, it only stops whenever I close the stack or/and livecode.
That's a bit over the top. Who's designing this you or Craig?...feel free to check what they are.
Me, I didn't mean at any way that he'll design it for me, I just want hints, what I meant by that was that he can check what idle games are, since he doesn't seem to know that.Simon wrote:That's a bit over the top. Who's designing this you or Craig?...feel free to check what they are.
Simon
Thanks, but I don't seem to find the seconds and the number of factories in the script, I am completely lost and don't know how to store that information.sturgis wrote:It sounds like you need to know the time of the last update before closing the app, the final amount, and any owned "factories".
At which point, the next time you open up the stack, you read in the previous balance, figure out the time since last access and do the math to update your score to the current state.
The easiest way (when the stack is shutting down) would be to store "the seconds" (and as I said above) the score, and the number of factories. Then when starting up again, get "the seconds" (aka the time it is now, in seconds) subtract "the seconds" that you stored in your file, then use that number. So, for example if you are adding score every 20 seconds and its been 20000 seconds since you played the game last, there are 1000 scoring intervals.
1000 x .2 x the number of factories owned, added to the score that you saved right before shutdown last time.
IE (scoring intervals x the score increase x factories) + previous score
Code: Select all
on openCard
KeepTrack
end openCard
on keepTrack
add 1 to fld 2
put the seconds & return after fld 1
end keepTrack