Are you sure it's not loading when you tap return?
Try tapping return with this code. It'll show how many times it GOSUBS to that label.
do
IF returnkey()=1
`stop sound 1
`stop sound 2
`stop sound 3
gosub _gameload
endif
loop
_gameload:
inc Count
print "GameLoaded #"+str$(Count)
return
Now to actually only load it once you need a switch. You check for the return key and look for the switch being off (zero) then turn the switch on (one) so it's not loaded again.
do
IF returnkey()=1 and Loaded=0
`stop sound 1
`stop sound 2
`stop sound 3
gosub _gameload
` Turn the switch on
Loaded=1
endif
loop
_gameload:
inc Count
print "GameLoaded #"+str$(Count)
return
You could also use the KEYSTATE() command but it works just like RETURNKEY().
do
IF keystate(28) and Loaded=0
`stop sound 1
`stop sound 2
`stop sound 3
gosub _gameload
` Turn the switch on
Loaded=1
endif
loop
_gameload:
inc Count
print "GameLoaded #"+str$(Count)
return
You can use this as a reference of all the keystate numbers:
http://mysite.verizon.net/grueslayer/Keystate.png
By the way you got the code snips backwards... / should be on the bottom.