|
1
|
image_xscale = 4;
|
|
2
|
image_yscale = 4;
|
|
3
|
image_index = 1;
|
|
4
|
image_speed = 0;
|
|
5
|
pippins_mode = 0;
|
|
6
|
pippins_sprite = -4;
|
|
7
|
pippins_anim = 0;
|
|
8
|
pippins_anim_speed = 0.2;
|
|
9
|
cover_marker = -4;
|
|
10
|
pippins_x = x;
|
|
11
|
pippins_y = y;
|
|
12
|
hold_coin = false;
|
|
13
|
is_inside = true;
|
|
14
|
is_init = false;
|
|
15
|
is_running = false;
|
|
16
|
timer = 0;
|
|
17
|
jump_time = 20;
|
|
18
|
jump_timer = irandom(5);
|
|
19
|
treasure_marker = scr_markerscr_marker
function scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (x, y, sprite_index);
|
|
20
|
treasure_marker.image_xscale = image_xscale;
|
|
21
|
treasure_marker.image_yscale = image_yscale;
|
|
22
|
treasure_marker.image_index = 1;
|
|
23
|
var _block = instance_create(treasure_marker.x, treasure_marker.y + 30, obj_solidblocksized);
|
|
24
|
with (_block)
|
|
25
|
{
|
|
26
|
image_xscale = 2;
|
|
27
|
image_yscale = 1;
|
|
28
|
}
|
|
29
|
readable = -4;
|
|
30
|
|
|
31
|
init = function(arg0)
|
|
32
|
{
|
|
33
|
pippins_mode = arg0;
|
|
34
|
pippins_x = x;
|
|
35
|
pippins_y = y;
|
|
36
|
pippins_sprite = 1501;
|
|
37
|
switch (pippins_mode)
|
|
38
|
{
|
|
39
|
case 0:
|
|
40
|
pippins_sprite = 4970;
|
|
41
|
is_inside = false;
|
|
42
|
break;
|
|
43
|
case 1:
|
|
44
|
pippins_sprite = 2210;
|
|
45
|
break;
|
|
46
|
default:
|
|
47
|
pippins_sprite = 1501;
|
|
48
|
break;
|
|
49
|
}
|
|
50
|
scr_depthscr_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));
}
} ();
|
|
51
|
treasure_marker.depth = depth + 10;
|
|
52
|
readable = instance_create(x + 20, y + 20, obj_readable_room1);
|
|
53
|
with (readable)
|
|
54
|
{
|
|
55
|
image_xscale = 2;
|
|
56
|
image_yscale = 2;
|
|
57
|
extflag = "pippins_rummage";
|
|
58
|
}
|
|
59
|
is_init = true;
|
|
60
|
};
|
|
61
|
|
|
62
|
set_depth = function(arg0)
|
|
63
|
{
|
|
64
|
depth = arg0;
|
|
65
|
treasure_marker.depth = depth + 10;
|
|
66
|
};
|
|
67
|
|
|
68
|
pause = function()
|
|
69
|
{
|
|
70
|
pippins_anim_speed = 0;
|
|
71
|
scr_emotescr_emote
function scr_emote()
{
__dmult = 1 + global.darkzone;
__emotebubble = instance_create(x, y - 15, obj_excblcon);
__emotebubble.alarm[0] = argument[1];
__emotebubble.image_xscale = __dmult;
__emotebubble.image_yscale = __dmult;
__emotexoff = 0;
__emoteyoff = 0;
__anchorx = sprite_get_xoffset(sprite_index);
if (argument[0] == "!")
{
__emotebubble.sprite_index = spr_exc;
__emotebubble.y = y - (10 * __dmult);
__emotexoff = 10 * __dmult;
}
if (argument[0] == "?")
{
__emotebubble.sprite_index = spr_emote_questionmark;
__emotebubble.y = y - (10 * __dmult);
__emotexoff = 10 * __dmult;
}
if (argument[0] == "...")
{
__emotebubble.sprite_index = spr_emote_ellipsis;
__emotebubble.y = y - (10 * __dmult);
__emotexoff = 10 * __dmult;
}
if (argument[0] == "note")
{
__emotebubble.sprite_index = spr_musblc;
__emotebubble.y = y - (10 * __dmult);
__emotexoff = 10 * __dmult;
}
if (argument_count >= 3)
__emotexoff = argument[2];
if (argument_count >= 4)
__emoteyoff = argument[3];
__emotebubble.y += __emoteyoff;
if (image_xscale > 0)
__emotebubble.x = (((x - (__anchorx * image_xscale)) + ((sprite_width / 2) * sign(image_xscale))) - (__emotebubble.sprite_width / 2)) + __emotexoff;
else
__emotebubble.x = ((x + (__anchorx * image_xscale)) - ((sprite_width / 2) * sign(image_xscale)) - (__emotebubble.sprite_width / 2)) + __emotexoff;
} ("!", 30);
|
|
72
|
};
|
|
73
|
|
|
74
|
look_out = function()
|
|
75
|
{
|
|
76
|
with (readable)
|
|
77
|
instance_destroy();
|
|
78
|
if (is_inside)
|
|
79
|
{
|
|
80
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
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_lerpvar_respect()
{
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]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("pippins_y", pippins_y, pippins_y + 60, 8);
|
|
81
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("pippins_sprite", 1175, 9);
|
|
82
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (scr_lerpvar, 9, "pippins_y", pippins_y + 60, pippins_y, 8);
|
|
83
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("is_inside", false, 14);
|
|
84
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("hold_coin", true, 15);
|
|
85
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("pippins_sprite", 2047, 15);
|
|
86
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("pippins_anim", 4, 14);
|
|
87
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (scr_lerpvar, 14, "pippins_y", pippins_y, pippins_y - 80, 6, 3, "out");
|
|
88
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (scr_lerpvar, 20, "pippins_y", pippins_y - 80, pippins_y, 6, 3, "in");
|
|
89
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("pippins_sprite", 1540, 26);
|
|
90
|
}
|
|
91
|
else
|
|
92
|
{
|
|
93
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("pippins_sprite", 1540, 26);
|
|
94
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} ("hold_coin", true, 26);
|
|
95
|
}
|
|
96
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (scr_lerpvar, 40, "pippins_x", pippins_x, pippins_x + 1220, 140, 3, "out");
|
|
97
|
scr_delay_var("pippins_anim_speed", 0, 40);
|
|
98
|
scr_delay_var("is_running", true, 40);
|
|
99
|
scr_delay_var("is_running", false, 140);
|
|
100
|
};
|
|
101
|
|
|
102
|
clean_up = function()
|
|
103
|
{
|
|
104
|
with (readable)
|
|
105
|
instance_destroy();
|
|
106
|
with (treasure_marker)
|
|
107
|
scr_depthscr_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));
}
} ();
|
|
108
|
instance_destroy();
|
|
109
|
};
|