1 |
function scr_determine_player_spritesscr_determine_player_spritesfunction scr_determine_player_sprites() //gml_Script_scr_determine_player_sprites
{
if (global.route != 3)
{
usprite_walk = spr_pl_up
dsprite_walk = spr_pl_down
lsprite_walk = spr_pl_left
rsprite_walk = spr_pl_right
usprite_run = spr_pl_run_up
dsprite_run = spr_pl_run_down
lsprite_run = spr_pl_run_left
rsprite_run = spr_pl_run_right
}
else
{
usprite_walk = spr_pl_up
dsprite_walk = spr_pl_down_geno
lsprite_walk = spr_pl_left_geno
rsprite_walk = spr_pl_right_geno
usprite_run = spr_pl_run_up_geno
dsprite_run = spr_pl_run_down_geno
lsprite_run = spr_pl_run_left_geno
rsprite_run = spr_pl_run_right_geno
}
switch global.player_sprites
{
case "kanako":
usprite_walk = spr_kanako_up_walk
dsprite_walk = spr_kanako_down_walk
lsprite_walk = spr_kanako_left_walk
rsprite_walk = spr_kanako_right_walk
usprite_run = spr_kanako_up_walk
dsprite_run = spr_kanako_down_walk
lsprite_run = spr_kanako_left_walk
rsprite_run = spr_kanako_right_walk
break
case "normal":
shader_on = false
palette_index = 0
break
case "snowdin":
shader_on = true
palette_index = 0
break
case "dunescave":
shader_on = true
palette_index = 1
break
case "steamworkslava":
shader_on = true
palette_index = 2
break
case "water":
if (room == rm_dunes_01)
{
shader_on = true
palette_index = 1
}
if (global.route != 3)
{
usprite_walk = 54
dsprite_walk = 55
lsprite_walk = 52
rsprite_walk = 53
usprite_run = spr_pl_run_up_water
dsprite_run = spr_pl_run_down_water
lsprite_run = spr_pl_run_left_water
rsprite_run = spr_pl_run_right_water
}
else
{
usprite_walk = 54
dsprite_walk = 1571
lsprite_walk = 2594
rsprite_walk = 3094
usprite_run = spr_pl_run_up_water_geno
dsprite_run = spr_pl_run_down_water_geno
lsprite_run = spr_pl_run_left_water_geno
rsprite_run = spr_pl_run_right_water_geno
}
break
}
usprite = usprite_walk
dsprite = dsprite_walk
lsprite = lsprite_walk
rsprite = rsprite_walk
if (is_sprinting == true)
{
usprite = usprite_run
dsprite = dsprite_run
lsprite = lsprite_run
rsprite = rsprite_run
}
if (palette_index != 0)
shader_on = true
} () //gml_Script_scr_determine_player_sprites |
2 |
{ |
3 |
if (global.route != 3) |
4 |
{ |
5 |
usprite_walk = spr_pl_up |
6 |
dsprite_walk = spr_pl_down |
7 |
lsprite_walk = spr_pl_left |
8 |
rsprite_walk = spr_pl_right |
9 |
usprite_run = spr_pl_run_up |
10 |
dsprite_run = spr_pl_run_down |
11 |
lsprite_run = spr_pl_run_left |
12 |
rsprite_run = spr_pl_run_right |
13 |
} |
14 |
else |
15 |
{ |
16 |
usprite_walk = spr_pl_up |
17 |
dsprite_walk = spr_pl_down_geno |
18 |
lsprite_walk = spr_pl_left_geno |
19 |
rsprite_walk = spr_pl_right_geno |
20 |
usprite_run = spr_pl_run_up_geno |
21 |
dsprite_run = spr_pl_run_down_geno |
22 |
lsprite_run = spr_pl_run_left_geno |
23 |
rsprite_run = spr_pl_run_right_geno |
24 |
} |
25 |
switch global.player_sprites |
26 |
{ |
27 |
case "kanako": |
28 |
usprite_walk = spr_kanako_up_walk |
29 |
dsprite_walk = spr_kanako_down_walk |
30 |
lsprite_walk = spr_kanako_left_walk |
31 |
rsprite_walk = spr_kanako_right_walk |
32 |
usprite_run = spr_kanako_up_walk |
33 |
dsprite_run = spr_kanako_down_walk |
34 |
lsprite_run = spr_kanako_left_walk |
35 |
rsprite_run = spr_kanako_right_walk |
36 |
break |
37 |
case "normal": |
38 |
shader_on = false |
39 |
palette_index = 0 |
40 |
break |
41 |
case "snowdin": |
42 |
shader_on = true |
43 |
palette_index = 0 |
44 |
break |
45 |
case "dunescave": |
46 |
shader_on = true |
47 |
palette_index = 1 |
48 |
break |
49 |
case "steamworkslava": |
50 |
shader_on = true |
51 |
palette_index = 2 |
52 |
break |
53 |
case "water": |
54 |
if (room == rm_dunes_01) |
55 |
{ |
56 |
shader_on = true |
57 |
palette_index = 1 |
58 |
} |
59 |
if (global.route != 3) |
60 |
{ |
61 |
usprite_walk = 54 |
62 |
dsprite_walk = 55 |
63 |
lsprite_walk = 52 |
64 |
rsprite_walk = 53 |
65 |
usprite_run = spr_pl_run_up_water |
66 |
dsprite_run = spr_pl_run_down_water |
67 |
lsprite_run = spr_pl_run_left_water |
68 |
rsprite_run = spr_pl_run_right_water |
69 |
} |
70 |
else |
71 |
{ |
72 |
usprite_walk = 54 |
73 |
dsprite_walk = 1571 |
74 |
lsprite_walk = 2594 |
75 |
rsprite_walk = 3094 |
76 |
usprite_run = spr_pl_run_up_water_geno |
77 |
dsprite_run = spr_pl_run_down_water_geno |
78 |
lsprite_run = spr_pl_run_left_water_geno |
79 |
rsprite_run = spr_pl_run_right_water_geno |
80 |
} |
81 |
break |
82 |
} |
83 |
|
84 |
usprite = usprite_walk |
85 |
dsprite = dsprite_walk |
86 |
lsprite = lsprite_walk |
87 |
rsprite = rsprite_walk |
88 |
if (is_sprinting == true) |
89 |
{ |
90 |
usprite = usprite_run |
91 |
dsprite = dsprite_run |
92 |
lsprite = lsprite_run |
93 |
rsprite = rsprite_run |
94 |
} |
95 |
if (palette_index != 0) |
96 |
shader_on = true |
97 |
} |