Change Scene and Reset Scene not always working
Zilla
Member Posts: 157
I wanted to reset my scene when my actor leaves the screen
`
IF X < 0 OR Y < 0 OR X > 320 OR Y > 480 THEN
Play a Sound (Run to Completion)
Timer (After 2 Seconds / (Run to Completion))
Change Scene to itself
ENDIF
`
It's weird: The Change Scene command will not always be executed....
`
IF X < 0 OR Y < 0 OR X > 320 OR Y > 480 THEN
Play a Sound (Run to Completion)
Timer (After 2 Seconds / (Run to Completion))
Change Scene to itself
ENDIF
`
It's weird: The Change Scene command will not always be executed....
Comments
I changed the code and now it seems to work:
`
IF X < 0 OR Y < 0 OR X > 320 OR Y > 480 THEN
Set Attribute Game.resetScene = true
Change Scene to itself
ENDIF
IF Game.resetScene = true
Set Attribute Game.resetScene = false
Play a Sound (Run to Completion)
ENDIF
`
But if I encounter more problems with this issue, I will send you the game ))