Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_npc_ramb_Create_0

(view raw script w/o annotations or w/e)
1
global.flag[20 other_text_command] = 0;
2
image_xscale = 2;
3
image_yscale = 2;
4
anim = 0;
5
anim_timer = 0;
6
current_state = 0;
7
load_sprite = false;
8
room_mode = 0;
9
head_sprite_default = (room == room_dw_green_room) ? spr_npc_ramb_head_turned : spr_npc_ramb_head_happy;
10
head_sprites = [head_sprite_default, spr_npc_ramb_head_turn, spr_npc_ramb_head_happy_nostalgic, spr_npc_ramb_head_surprised, spr_npc_ramb_head_annoyed, spr_npc_ramb_head_turn_look, spr_npc_ramb_head_turn_look_side, spr_npc_ramb_head_turn_subtle];
11
head_sprite = head_sprite_default;
12
head_sprite_index = 0;
13
body_sprite = (room == room_dw_green_room) ? spr_npc_ramb_body_clean : spr_npc_ramb_body;
14
stone_mode = room == room_dw_console_room;
15
if (stone_mode)
16
    body_sprite = spr_npc_ramb_half_stone;
17
body_anim = 0;
18
talked = 0;
19
board_talk = false;
20
board_con = 0;
21
board_talk_count = 0;
22
has_prize = false;
23
prize_marker = -4;
24
prize_text = "";
25
get_prize_sequence = false;
26
get_prize_con = 0;
27
prize_flag = (global.plot < 150) ? 1028 : 1030;
28
if (room == room_dw_green_room)
29
{
30
    if (global.plot < 205)
31
        has_prize = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(prize_flag) == 0;
32
    if (has_prize)
33
    {
34
        prize_marker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(760, 82, spr_dw_green_room_prize);
35
        with (prize_marker)
36
            
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
37
    }
38
}
39
event_inherited();
40
41
get_prize = function(arg0)
42
{
43
    prize_text = arg0;
44
    get_prize_sequence = true;
45
};
46
47
get_nothing = function()
48
{
49
    get_prize_sequence = true;
50
    get_prize_con = 10;
51
};