Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_chujin_plaque_Step_0

(view raw script w/o annotations or w/e)
1
switch scene
2
{
3
    case 0:
4
        if (scr_interact
scr_interact

function scr_interact() //gml_Script_scr_interact { if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_scr_normal_state) { var pl_dir = obj_pl.direction var pl_x = 0 var pl_y = 0 var check_distance_x = 0 var check_distance_y = 0 switch pl_dir { case 0: pl_x = obj_pl.bbox_right pl_y = obj_pl.bbox_top + 1 check_distance_x = 20 break case 180: pl_x = obj_pl.bbox_left pl_y = obj_pl.bbox_top + 1 check_distance_x = -20 break case 90: pl_x = obj_pl.x pl_y = obj_pl.bbox_top check_distance_y = -20 break case 270: pl_x = obj_pl.x pl_y = obj_pl.bbox_bottom check_distance_y = 20 break } if collision_line_first(pl_x, pl_y, (pl_x + check_distance_x), (pl_y + check_distance_y), id, false, false) return true; } }
() && keyboard_multicheck_pressed(0))
5
        {
6
            scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() //gml_Script_scr_cutscene_start { global.cutscene = true obj_pl.state = gml_Script_scr_frozen_state obj_pl.image_index = 0 obj_pl.image_speed = 0 }
()
7
            cutscene_advance()
8
        }
9
        break
10
    case 1:
11
        cutscene_dialogue()
12
        with (msg)
13
            message[0] = "* You Tried in Engineering#  Award: Mr. Chujin Ketsukane"
14
        break
15
    case 2:
16
        if (global.party_member == -4 || global.sworks_flag[17] == 1)
17
        {
18
            scene = 0
19
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
20
        }
21
        else
22
            cutscene_wait(1)
23
        break
24
    case 3:
25
        if (!instance_exists(obj_ceroba_npc))
26
            scr_follower_into_actor
scr_follower_into_actor

function scr_follower_into_actor() //gml_Script_scr_follower_into_actor { if (global.party_member == noone) return false; actor_follower = instance_create(global.party_member.x, global.party_member.y, global.party_member.npc_actor) with (global.party_member) { switch sprite_index { case up_sprite: case up_sprite_idle: case up_sprite_run: other.actor_follower.npc_direction = "up" other.actor_follower.sprite_index = other.actor_follower.up_sprite break case down_sprite: case down_sprite_idle: case down_sprite_run: other.actor_follower.npc_direction = "down" other.actor_follower.sprite_index = other.actor_follower.down_sprite break case left_sprite: case left_sprite_idle: case left_sprite_run: other.actor_follower.npc_direction = "left" other.actor_follower.sprite_index = other.actor_follower.left_sprite break case right_sprite: case right_sprite_idle: case right_sprite_run: other.actor_follower.sprite_index = other.actor_follower.right_sprite break } instance_destroy() } return true; }
()
27
        obj_ceroba_npc.npc_direction = "up"
28
        cutscene_dialogue()
29
        with (msg)
30
        {
31
            sndfnt = 108
32
            message[0] = "* He never told me#  he won an award..."
33
            message[1] = "* I'm proud of him."
34
            prt[0] = 370
35
            prt[1] = 370
36
        }
37
        break
38
    case 4:
39
        global.sworks_flag[17] = 1
40
        scene = 0
41
        scr_actor_into_follower
scr_actor_into_follower

function scr_actor_into_follower(argument0, argument1) //gml_Script_scr_actor_into_follower { if (!instance_exists(argument0)) return false; if (argument1 == noone) return false; instance_create(argument0.x, argument0.y, argument1) argument1.x = argument0.x argument1.y = argument0.y with (argument0) { switch npc_direction { case "up": argument1.sprite_index = argument1.up_sprite_idle break case "down": argument1.sprite_index = argument1.down_sprite_idle break case "left": argument1.sprite_index = argument1.left_sprite_idle break case "right": argument1.sprite_index = argument1.right_sprite_idle break } } instance_destroy(argument0) }
(obj_ceroba_npc, obj_ceroba_follower)
42
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
43
        break
44
}