Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_starwalker_battle_Step_0

(view raw script w/o annotations or w/e)
1
if (walkcon == 1)
2
{
3
    visible = 0;
4
    wings = 
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; }
(x + 92, y + 74, spr_starwalker_wings);
5
    wings.image_index = image_index;
6
    with (wings)
7
    {
8
        image_speed = 0.2;
9
        depth = 1010;
10
        hspeed = 5;
11
        vspeed = -1;
12
        gravity_direction = 90;
13
        gravity = 0.2;
14
    }
15
    body = 
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; }
(x + 70, y + 52, spr_starwalker_walk);
16
    with (body)
17
    {
18
        depth = 1000;
19
        image_speed = 0;
20
        vspeed = 8;
21
        image_speed = 0;
22
    }
23
    walkcon = 2;
24
}
25
if (walkcon == 2)
26
{
27
    with (body)
28
        
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)); } }
();
29
    walktimer += 1;
30
    if (walktimer >= 20)
31
    {
32
        hspeed = 7;
33
        with (body)
34
        {
35
            vspeed = 0;
36
            hspeed = 7;
37
            image_speed = 0.25;
38
        }
39
        bodycheck = instance_create(body.x, body.y + 20, obj_readable_room1);
40
        bodycheck.image_xscale = 2;
41
        bodycheck.image_yscale = 2;
42
        with (bodycheck)
43
            hspeed = 7;
44
        walkcon = 3;
45
        walktimer = 0;
46
    }
47
}