Neverending Choice Loop

One scene in my game forever loops and the *temp variables I have in place to add/remove options seem to not activate no matter what I do. Can anyone explain what I’ve done wrong here? Thank you in advance!

*label spaceship
*temp checkonray false
*temp fuel false
*temp airlocks false
*temp systems false
*temp route false
*temp custsast 0
*temp fuellevel 100
*fake_choice
	*selectable_if (checkonray = false) #Check on Ray.
		*set checkonray true
		You look to your right and spot Ray checking his monitors. He noticed you watching and flashes you thumbs. "Ready?"
		*gosub spaceship
	*selectable_if (fuel = false) #Double check fuel levels.
		*set fuel true
		Your fuel levels are at 100%.
		*gosub spaceship
	*selectable_if (airlocks = false) #Make sure air locks are seated.
		*set airlocks true
		All air locks are shut and sealed.
		*gosub spaceship
	*selectable_if (systems = false) #Run systems test.
		*set systems true
		Loading systsems test...
		*page_break
		Test intializing...
		*page_break
		Running systems test...
		*page_break
		System test complete...
		*page_break
		Result: Passed.
		*gosub spaceship
	*selectable_if (route = false) #Set route.
		*set route true
		Route set. Destiniation: Delta-713, Quadrant 219-722-779, Mandrake Solar System.
		*gosub spaceship
	*selectable_if (route = true) #Pull lever.
		Your seat begins to vibrate, lightly at first but gradually it becomes more and more agressive! The Room is filled with a rumbling noise and you grip the arm rests of your seat. The sky zips by you as you hear your boosters roars as they propell you upwards!
		*page_break
		Then, almost as sudden it starts it stops. You're thrust into the dark, arounded by thousands of distant stars and planets. Incredible!
		*page_break
		*gosub spaceship2

Most of your options end with *gosub spaceship. But label spasheship stands before you establish your temporary variables. So they reset each time. Do you actually need *gosub instead of *goto here? Try to change to something like this:

*label spaceship
*temp checkonray false
*temp fuel false
*temp airlocks false
*temp systems false
*temp route false
*temp custsast 0
*temp fuellevel 100
*label spaceship_1
*choice
	*selectable_if (checkonray = false) #Check on Ray.
		*set checkonray true
		You look to your right and spot Ray checking his monitors. He noticed you watching and flashes you thumbs. "Ready?"
		*goto spaceship_1
	*selectable_if (fuel = false) #Double check fuel levels.
		*set fuel true
		Your fuel levels are at 100%.
		*goto spaceship_1
	*selectable_if (airlocks = false) #Make sure air locks are seated.
		*set airlocks true
		All air locks are shut and sealed.
		*goto spaceship_1
	*selectable_if (systems = false) #Run systems test.
		*set systems true
		Loading systsems test...
		*page_break
		Test intializing...
		*page_break
		Running systems test...
		*page_break
		System test complete...
		*page_break
		Result: Passed.
		*goto spaceship_1
	*selectable_if (route = false) #Set route.
		*set route true
		Route set. Destiniation: Delta-713, Quadrant 219-722-779, Mandrake Solar System.
		*goto spaceship_1
	

Not sure about the last option. I don’t know what’s under spaceship2.

1 Like

That was the problem! Thank you so much!!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.