Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Up and down will be used to change selected choice.
- if keyboard_check_pressed(vk_up){
- selectedChoice -= 1;
- }
- else
- if keyboard_check_pressed(vk_down){
- selectedChoice += 1;
- }
- // see if the selected choice variable is higher or lower than the amount of choices we actually have defined.
- // if it's above, we loop around to the first choice. If it's below, loop around to the end of the choices.
- // because we changed the selected choice before we execute this part, we make sure here that we don't go "out of bounds".
- if selectedChoice > startChoices - 1
- selectedChoice = 0;
- else if selectedChoice < 0
- selectedChoice = startChoices - 1;
- if keyboard_check_pressed(global.buttonAccept) { // Check to see which button we are on and either go to character select or exit the application.
- if startChoiceArray[selectedChoice] == "Start" {
- room_goto(room_CharSelect);
- selectedChoice = 0;
- }
- else if startChoiceArray[selectedChoice] == "Quit Game"
- game_end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement