1 | switch npc_direction |
2 | { |
3 | case "up": |
4 | obj_pl.direction = 90 |
5 | obj_pl.sprite_index = obj_pl.usprite |
6 | break |
7 | case "right": |
8 | obj_pl.direction = 0 |
9 | obj_pl.sprite_index = obj_pl.rsprite |
10 | break |
11 | case "down": |
12 | obj_pl.direction = 270 |
13 | obj_pl.sprite_index = obj_pl.dsprite |
14 | break |
15 | case "left": |
16 | obj_pl.direction = 180 |
17 | obj_pl.sprite_index = obj_pl.lsprite |
18 | break |
19 | } |
20 | |
21 | obj_pl.image_alpha = 1 |