| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
var item_number = ds_list_size(global.fast_travel_list) - 1; |
| 4 |
if (global.down_keyp) |
| 5 |
{ |
| 6 |
if (item_selected <= item_number) |
| 7 |
item_selected += 1; |
| 8 |
else |
| 9 |
item_selected = 1; |
| 10 |
audio_play_sound(snd_mainmenu_select, 1, 0); |
| 11 |
} |
| 12 |
if (global.up_keyp) |
| 13 |
{ |
| 14 |
if (item_selected > 1) |
| 15 |
item_selected -= 1; |
| 16 |
else |
| 17 |
item_selected = item_number; |
| 18 |
audio_play_sound(snd_mainmenu_select, 1, 0); |
| 19 |
} |
| 20 |
point_selected = ds_list_find_value(global.fast_travel_list, item_selected - 1); |
| 21 |
switch (point_selected) |
| 22 |
{ |
| 23 |
case "Snowdin - Forest": |
| 24 |
global.fast_travel_newroom = 56; |
| 25 |
global.fast_travel_newx = 200; |
| 26 |
global.fast_travel_newy = 100; |
| 27 |
break; |
| 28 |
case "Dunes - West Mines": |
| 29 |
global.fast_travel_newroom = 81; |
| 30 |
global.fast_travel_newx = 510; |
| 31 |
global.fast_travel_newy = 170; |
| 32 |
break; |
| 33 |
case "Dunes - Oasis Valley": |
| 34 |
global.fast_travel_newroom = 276; |
| 35 |
global.fast_travel_newx = 880; |
| 36 |
global.fast_travel_newy = 720; |
| 37 |
break; |
| 38 |
case "Wild East - Farm": |
| 39 |
global.fast_travel_newroom = 137; |
| 40 |
global.fast_travel_newx = 600; |
| 41 |
global.fast_travel_newy = 120; |
| 42 |
break; |
| 43 |
case "Steamw. - Commons": |
| 44 |
global.fast_travel_newroom = 175; |
| 45 |
global.fast_travel_newx = 520; |
| 46 |
global.fast_travel_newy = 120; |
| 47 |
break; |
| 48 |
case "Steamw. - C. Station": |
| 49 |
global.fast_travel_newroom = 202; |
| 50 |
global.fast_travel_newx = 400; |
| 51 |
global.fast_travel_newy = 290; |
| 52 |
break; |
| 53 |
case "Hotland - Crossroads": |
| 54 |
global.fast_travel_newroom = 211; |
| 55 |
global.fast_travel_newx = 170; |
| 56 |
global.fast_travel_newy = 120; |
| 57 |
break; |
| 58 |
} |
| 59 |
if (keyboard_multicheck_pressed(0)) |
| 60 |
{ |
| 61 |
if (global.fast_travel_newroom == room) |
| 62 |
{ |
| 63 |
audio_play_sound(snd_fail, 1, 0); |
| 64 |
exit; |
| 65 |
} |
| 66 |
global.fast_travel_point = point_selected; |
| 67 |
audio_play_sound(snd_confirm, 1, 0); |
| 68 |
instance_destroy(); |
| 69 |
} |
| 70 |
if (keyboard_multicheck_pressed(1)) |
| 71 |
{ |
| 72 |
global.fast_travel_point = "None"; |
| 73 |
audio_play_sound(snd_fail, 1, 0); |
| 74 |
instance_destroy(); |
| 75 |
} |