FOR REFERENCE, I used the following to move scenes between 3, if you want to use/abuse/criticize/improve then feel free
scene 1 = main game
scene 2 loading intro
scene 3 game over screen with click to replay
VisualEditor_SetScene ( 2 )
global sceneOver = 0 //booo
do //THIS IS THE BIG LOOP, with all scenes inside
if VisualEditor_GetScene () = 2 //loading screen
repeat
sync()
until GetPointerPressed()=1
VisualEditor_SetScene (1)
endif
if VisualEditor_GetScene () = 3 //sceneOver screen (here gameOver)
repeat
sync()
until GetPointerPressed()=1
VisualEditor_SetScene (1)
for i=1 to SPRITE_RECORD_TOTAL //i have all sprites in a Types array, all declared in main loop
thisSpriteID = spriteRecord[i].spriteID
SetSpriteVisible(thisSpriteID,1)
next i
endif
if VisualEditor_GetScene () = 1
//includes the following function called on game over
function SUBFunctionShowScene3GameOver(spriteRecord ref as spriteType[])
for i=1 to SPRITE_RECORD_TOTAL
thisSpriteID = spriteRecord[i].spriteID
SetSpriteVisible(thisSpriteID,0)
next i
VisualEditor_SetScene ( 3 )
sceneOver=1
endfunction
//relevant do loop for scene1
do
....
sync ( )
if sceneOver = 1
sceneOver = 0
VisualEditor_SetScene ( 3 )
exit
endif
loop
endif //for testing if scene 1
loop //for all scenes
Looking forward to hearing how things could be much better for this beginner!
Thx again smallg!