Hi Sparkout, just going through what you sent now. But to quickly answer your question about this:
on updateScreen
if tGameRunning is true then
-- we check the tGameRunning flag and only do the game updates if it's running
moveBox
DropMines
collisions
end if
put true into tGameRunning
-- why do you reset the game running flag to true here?
end updateScreen
I was having problems for some time with getting the game going it was crashing getting stuck, etc . Then, while searching for possible answers I stumbled on another casual post I came across and an unrelated question about getting a timer to work. He had written this:
global gGameRunning
on mouseUp
if gGameRunning is true then
add 100 to field "score"
send "mouseUp" to me in 1 second
end if
put true into gGameRunning
end mouseUp
so out of instinct (because I saw that nothing was entering into sGameRunning in the debugging) I decided to move it from its original position and put it where you see now, then everything started working normally. But as to why? Nope, I have absolutely no idea, I simply do not know enough to know this sort of thing yet.
EDIT: Well I suppose really I ought to just put this on a shelf for about 6 months. I have to accept when I've been beaten. I guess building a simple little game is actually far more complex than writing an app and Iv'e done three of those. The simplicity is quite deceiving really I've been two weeks at this. So back to the drawing board with another fresh idea and another app exercise.
Thankyou Sparkout, your code is not wasted at all.
kind regards
chris
Trying to explode a submarine using a sprite
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Trying to explode a submarine using a sprite
You aren't beaten yet!
Re: Trying to explode a submarine using a sprite
Yes I am...and it's infuriating...