|
1
|
event_inherited();
|
|
2
|
digits = 1;
|
|
3
|
my_score = 0;
|
|
4
|
flip1 = false;
|
|
5
|
flip2 = false;
|
|
6
|
flip3 = false;
|
|
7
|
flip1_scale = 1;
|
|
8
|
flip2_scale = 1;
|
|
9
|
flip3_scale = 1;
|
|
10
|
|
|
11
|
score_change = function(arg0)
|
|
12
|
{
|
|
13
|
var old_score1, old_score2, old_score3;
|
|
14
|
switch (string_length(string(my_score)))
|
|
15
|
{
|
|
16
|
case 1:
|
|
17
|
old_score1 = string_char_at(string(my_score), 1);
|
|
18
|
old_score2 = -1;
|
|
19
|
old_score3 = -1;
|
|
20
|
break;
|
|
21
|
case 2:
|
|
22
|
old_score1 = string_char_at(string(my_score), 1);
|
|
23
|
old_score2 = string_char_at(string(my_score), 2);
|
|
24
|
old_score3 = -1;
|
|
25
|
break;
|
|
26
|
case 3:
|
|
27
|
old_score1 = string_char_at(string(my_score), 1);
|
|
28
|
old_score2 = string_char_at(string(my_score), 2);
|
|
29
|
old_score3 = string_char_at(string(my_score), 3);
|
|
30
|
break;
|
|
31
|
}
|
|
32
|
my_score += arg0;
|
|
33
|
my_score = min(my_score, 999);
|
|
34
|
var new_score1, new_score2, new_score3;
|
|
35
|
switch (string_length(string(my_score)))
|
|
36
|
{
|
|
37
|
case 1:
|
|
38
|
new_score1 = string_char_at(string(my_score), 1);
|
|
39
|
new_score2 = -1;
|
|
40
|
new_score3 = -1;
|
|
41
|
break;
|
|
42
|
case 2:
|
|
43
|
new_score1 = string_char_at(string(my_score), 1);
|
|
44
|
new_score2 = string_char_at(string(my_score), 2);
|
|
45
|
new_score3 = -1;
|
|
46
|
break;
|
|
47
|
case 3:
|
|
48
|
new_score1 = string_char_at(string(my_score), 1);
|
|
49
|
new_score2 = string_char_at(string(my_score), 2);
|
|
50
|
new_score3 = string_char_at(string(my_score), 3);
|
|
51
|
break;
|
|
52
|
}
|
|
53
|
if ((old_score1 != new_score1 || old_score1 == -1) && !flip1)
|
|
54
|
{
|
|
55
|
flip1 = true;
|
|
56
|
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;
} ("flip1_scale", 1, 0, 3, 0);
|
|
57
|
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, 3, "flip1_scale", 0, 1, 3, 0);
|
|
58
|
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_var, 6, "flip1", false);
|
|
59
|
}
|
|
60
|
if ((old_score2 != new_score2 || old_score2 == -1) && !flip2)
|
|
61
|
{
|
|
62
|
flip2 = true;
|
|
63
|
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;
} ("flip2_scale", 1, 0, 3, 0);
|
|
64
|
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, 3, "flip2_scale", 0, 1, 3, 0);
|
|
65
|
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_var, 6, "flip2", false);
|
|
66
|
}
|
|
67
|
if ((old_score3 != new_score3 || old_score3 == -1) && !flip3)
|
|
68
|
{
|
|
69
|
flip3 = true;
|
|
70
|
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;
} ("flip3_scale", 1, 0, 3, 0);
|
|
71
|
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, 3, "flip3_scale", 0, 1, 3, 0);
|
|
72
|
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_var, 6, "flip3", false);
|
|
73
|
}
|
|
74
|
};
|