Undertale script viewer

← back to main script listing

gml_Object_obj_bounceright_Step_0

(view raw script w/o annotations or w/e)
1
btime -= 1;
2
if (con == 1)
3
{
4
    with (obj_mainchara)
5
        scr_moveideal
scr_moveideal

if (argument0 > 0) { if (idealstep < argument0) idealstep += 1; idealxdist = (idealxx2 - x) / argument0; idealydist = (idealyy2 - y) / argument0; x += (idealxdist * idealstep); y += (idealydist * idealstep); }
(3);
6
}
7
if (con == 2)
8
{
9
    global.facing = myfacing;
10
    obj_mainchara.image_speed = 0;
11
    con = 3;
12
    alarm[4] = 10;
13
    if (room == room_fire_walkandbranch2 || room == room_fire_rpuzzle)
14
        alarm[4] = 5;
15
}
16
if (con == 4)
17
{
18
    fakegrav = 0.95;
19
    fakevspeed = 10;
20
    global.facing = myfacing;
21
    obj_mainchara.direction = mydirection;
22
    obj_mainchara.speed = 6;
23
    if (room == room_fire_rpuzzle)
24
        obj_mainchara.speed = 4;
25
    con = 5;
26
    faceoff = -2;
27
    alarm[4] = 20;
28
    if (room == room_fire_walkandbranch2)
29
    {
30
        alarm[4] = 10;
31
        fakevspeed = 10;
32
        fakegrav = 1.8;
33
    }
34
    snd_play(snd_vaporized);
35
}
36
if (con == 5)
37
{
38
    b = instance_create(x, y, obj_bouncersteam);
39
    b.speed = 7;
40
    b.direction = (90 + mydirection) / 2;
41
    if (mydirection < 300 && mydirection > 200)
42
    {
43
        b.direction = 180;
44
        b.speed = 2;
45
    }
46
    faceoff += 1;
47
    if (room == room_fire_walkandbranch2)
48
        faceoff += 1;
49
    if (floor(faceoff / 4) >= 1)
50
    {
51
        global.facing += 1;
52
        faceoff = 0;
53
    }
54
    if (global.facing > 3)
55
        global.facing = 0;
56
    fakevspeed -= fakegrav;
57
    obj_mainchara.y -= fakevspeed;
58
}
59
if (con == 6)
60
{
61
    if (instance_exists(obj_rtile))
62
        obj_rtile.faketime = 4;
63
    obj_mainchara.speed = 0;
64
    obj_mainchara.y = floor(obj_mainchara.y);
65
    con = 7;
66
    alarm[4] = 1;
67
}
68
if (con == 8)
69
{
70
    if (mydirection == 180 || mydirection == 0)
71
        obj_mainchara.y = y - 15;
72
    obj_bouncetilecontoller.bounce = 2;
73
    alarm[1] = 20;
gml_Object_obj_bounceright_Alarm_1.gml

if (con == 0) instance_create(x, y, obj_bouncersteam); alarm[1] = 10;
74
    global.phasing = 0;
75
    global.interact = 0;
76
    con = 0;
77
}
78
if (goldshift == 1 && gold == 1)
79
    event_user(2);