|
1
|
scr_platswap_initscr_platswap_init
function scr_platswap_init(arg0 = undefined, arg1 = true)
{
if (!instance_exists(obj_platswap))
return -4;
if (!instance_exists(obj_platswap_helper))
instance_create(0, 0, obj_platswap_helper);
var _helper = 658;
if (arg0 == undefined)
{
ignore_yorigin = 0;
if (!variable_instance_exists(id, "force_yplat"))
force_yplat = false;
with (_helper)
init_platswap(other.id, arg1);
return _helper;
}
if (instance_exists(arg0))
{
with (arg0)
{
if (!variable_instance_exists(id, "force_yplat"))
force_yplat = false;
ignore_yorigin = 0;
with (_helper)
init_platswap(arg0.id, arg1);
return _helper;
}
}
}
function scr_platswap_init_alt(arg0 = id, arg1 = true)
{
if (!instance_exists(obj_platswap))
return -4;
if (!instance_exists(obj_platswap_helper))
instance_create(0, 0, obj_platswap_helper);
if (instance_exists(arg0))
{
with (arg0)
{
ignore_yorigin = 1;
if (!variable_instance_exists(id, "force_yplat"))
force_yplat = false;
with (_helper)
init_platswap(other.id, arg1);
return _helper;
}
}
}
function scr_plat_make_pauseable(arg0 = id)
{
if (!instance_exists(obj_platswap))
return -4;
if (!instance_exists(obj_plat_pausing_helper))
instance_create(0, 0, obj_plat_pausing_helper);
with (obj_plat_pausing_helper)
add_object(arg0);
} (self, 2);
|
|
2
|
init = 0;
|
|
3
|
flower = -4;
|
|
4
|
squishtimer = 0;
|
|
5
|
wants_respawn = false;
|
|
6
|
y_anchor = y;
|
|
7
|
|
|
8
|
remove_flower = function()
|
|
9
|
{
|
|
10
|
has_flower = false;
|
|
11
|
with (flower)
|
|
12
|
instance_destroy();
|
|
13
|
};
|
|
14
|
|
|
15
|
if (image_xscale > 2)
|
|
16
|
sprite_index = spr_blue_platform_long;
|
|
17
|
else
|
|
18
|
sprite_index = spr_blue_platform_small;
|
|
19
|
if (instance_exists(obj_dw_fcastle_yellowblue))
|
|
20
|
{
|
|
21
|
if (sprite_index == spr_blue_platform_long)
|
|
22
|
sprite_index = spr_blue_platform_long_invcolor;
|
|
23
|
if (sprite_index == spr_blue_platform_small)
|
|
24
|
sprite_index = spr_blue_platform_small_invcolor;
|
|
25
|
}
|
|
26
|
scr_darksizescr_darksize
function scr_darksize()
{
var inst = id;
if (argument_count)
inst = argument0;
inst.image_xscale = 2;
inst.image_yscale = 2;
} ();
|
|
27
|
sinertimer = 0;
|
|
28
|
siner_timer_offset = random_range(0, 60);
|
|
29
|
platform = instance_create(x - (40 * image_xscale), y - (20 * image_xscale), (image_angle == 0) ? obj_plat_movingplat : obj_plat_movingblock);
|
|
30
|
platform.image_xscale = image_xscale;
|
|
31
|
if (sprite_index == spr_blue_platform_long)
|
|
32
|
platform.image_xscale *= 3;
|
|
33
|
if (sprite_index == spr_blue_platform_long_invcolor)
|
|
34
|
platform.image_xscale *= 3;
|
|
35
|
platform.visible = false;
|
|
36
|
platform.movetype = -1;
|
|
37
|
landed = false;
|
|
38
|
if (image_angle != 0)
|
|
39
|
{
|
|
40
|
}
|
|
41
|
image_speed = 0;
|
|
42
|
is_being_shot = false;
|
|
43
|
has_bullets = image_index;
|
|
44
|
explodetimer = 0;
|
|
45
|
active_timer = 0;
|
|
46
|
has_active_plat = true;
|
|
47
|
custom_landed = false;
|
|
48
|
was_touched = false;
|
|
49
|
chargesound = -4;
|
|
50
|
|
|
51
|
stop_sound = function()
|
|
52
|
{
|
|
53
|
if (chargesound != -4)
|
|
54
|
{
|
|
55
|
snd_stop(chargesound);
|
|
56
|
chargesound = -4;
|
|
57
|
}
|
|
58
|
};
|
|
59
|
|
|
60
|
get_shot = function()
|
|
61
|
{
|
|
62
|
explodetimer = 30;
|
|
63
|
is_being_shot = true;
|
|
64
|
chargesound = snd_loop(390, 0.1, 0.5);
|
|
65
|
};
|
|
66
|
|
|
67
|
restore_cloud = function()
|
|
68
|
{
|
|
69
|
stop_sound();
|
|
70
|
if (visible)
|
|
71
|
exit;
|
|
72
|
init = 0;
|
|
73
|
wants_respawn = false;
|
|
74
|
platform = instance_create(x - (40 * image_xscale), y - (20 * image_xscale), (image_angle == 0) ? obj_plat_movingplat : obj_plat_movingblock);
|
|
75
|
platform.image_xscale = image_xscale;
|
|
76
|
if (sprite_index == spr_blue_platform_long)
|
|
77
|
platform.image_xscale *= 3;
|
|
78
|
if (sprite_index == spr_blue_platform_long_invcolor)
|
|
79
|
platform.image_xscale *= 3;
|
|
80
|
platform.visible = false;
|
|
81
|
platform.movetype = -1;
|
|
82
|
has_active_plat = true;
|
|
83
|
explodetimer = 0;
|
|
84
|
active_timer = 0;
|
|
85
|
is_being_shot = false;
|
|
86
|
landed = false;
|
|
87
|
squishtimer = 0;
|
|
88
|
image_blend = c_white;
|
|
89
|
var xs = image_xscale;
|
|
90
|
var ys = image_yscale;
|
|
91
|
visible = true;
|
|
92
|
image_xscale = 0;
|
|
93
|
image_yscale = 0;
|
|
94
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("image_xscale", image_xscale, xs, 15, -1, "out");
|
|
95
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("image_yscale", image_yscale, ys, 25, -1, "out");
|
|
96
|
};
|
|
97
|
|
|
98
|
destroy_platform = function()
|
|
99
|
{
|
|
100
|
visible = 0;
|
|
101
|
stop_sound();
|
|
102
|
was_touched = false;
|
|
103
|
with (platform)
|
|
104
|
scr_doomscr_doom
function scr_doom(arg0, arg1)
{
var _doom = instance_create_depth(0, 0, 0, obj_doom);
with (_doom)
{
alarm[0]
target = arg0;
}
return _doom;
} (self, 3);
|
|
105
|
with (flower)
|
|
106
|
instance_destroy();
|
|
107
|
};
|