|
1
|
creatorid.x = x - 60;
|
|
2
|
creatorid.y = y - 40;
|
|
3
|
creatorid.image_angle = image_angle;
|
|
4
|
if (global.turntimer < 1)
|
|
5
|
instance_destroy();
|
|
6
|
if (global.turntimer < 3)
|
|
7
|
{
|
|
8
|
with (obj_animation)
|
|
9
|
{
|
|
10
|
if (sprite_index == spr_incense_fire_explosion1 || sprite_index == spr_incense_fire_explosion1c)
|
|
11
|
instance_destroy();
|
|
12
|
}
|
|
13
|
}
|
|
14
|
timer++;
|
|
15
|
if (depthinit == 0)
|
|
16
|
{
|
|
17
|
depthinit = 1;
|
|
18
|
creatordepthsave = creatorid.depth;
|
|
19
|
creatorid.depth = obj_heart.depth - 100;
|
|
20
|
}
|
|
21
|
if (global.turntimer <= 12 && !do_return)
|
|
22
|
do_return = true;
|
|
23
|
acceleration_val = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (acceleration_val, 0.25, 0.01);
|
|
24
|
if (do_return)
|
|
25
|
{
|
|
26
|
cur_angle = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (cur_angle, 270, abs(cur_angle - 270) * 0.25);
|
|
27
|
hang_x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hang_x, anchor_x, abs(hang_x - anchor_x) * acceleration_val);
|
|
28
|
height = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (height, anchor_y - hang_y, abs(height - (anchor_y - hang_y)) * 0.25);
|
|
29
|
}
|
|
30
|
else
|
|
31
|
{
|
|
32
|
cur_angle = hangle + (sin(timer * 0.1) * swing_max);
|
|
33
|
hang_x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hang_x, obj_growtangle.x, abs(hang_x - obj_growtangle.x) * acceleration_val);
|
|
34
|
height = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (height, height_goal, abs(height - height_goal) * 0.25);
|
|
35
|
}
|
|
36
|
x = hang_x + lengthdir_x(height, cur_angle);
|
|
37
|
y = hang_y + lengthdir_y(height, cur_angle);
|
|
38
|
if (timer < 20 || do_return)
|
|
39
|
exit;
|
|
40
|
if ((((scr_monsterpopscr_monsterpop
function scr_monsterpop()
{
return global.monster[0] + global.monster[1] + global.monster[2];
} () > 1 && (timer % (13 + floor(15 * ratio))) == 0) || (timer % (13 + floor(15 * ratio))) == 5) && (instance_number(obj_balthizard_enemy) > 1 || lightup == false)) || (scr_monsterpopscr_monsterpop
function scr_monsterpop()
{
return global.monster[0] + global.monster[1] + global.monster[2];
} () == 3 && (timer % 7) == 0 && lightup == true && instance_number(obj_balthizard_enemy) == 1) || (scr_monsterpopscr_monsterpop
function scr_monsterpop()
{
return global.monster[0] + global.monster[1] + global.monster[2];
} () == 2 && (timer % 7) == 0 && lightup == true && instance_number(obj_balthizard_enemy) == 1) || (scr_monsterpopscr_monsterpop
function scr_monsterpop()
{
return global.monster[0] + global.monster[1] + global.monster[2];
} () == 1 && (timer % 3) == 0 && lightup == true) || (scr_monsterpopscr_monsterpop
function scr_monsterpop()
{
return global.monster[0] + global.monster[1] + global.monster[2];
} () == 1 && (timer % 10) == 0 && lightup == false))
|
|
41
|
{
|
|
42
|
var rng_angle = irandom_range(-15, 15);
|
|
43
|
if (lightup == true)
|
|
44
|
{
|
|
45
|
d = instance_create(x, y, obj_incense_bullet);
|
|
46
|
d.sprite_index = spr_bullet_ghostfire_turtle;
|
|
47
|
d.direction = 270 + rng_angle;
|
|
48
|
d.speed = 1.5;
|
|
49
|
d.gravity_direction = direction;
|
|
50
|
d.friction = -0.2;
|
|
51
|
d.depth = obj_heart.depth - 1;
|
|
52
|
d.image_angle = 0;
|
|
53
|
d.image_speed = 0.25;
|
|
54
|
d.image_xscale = 0.75;
|
|
55
|
d.image_yscale = 0.75;
|
|
56
|
d.damage = damage;
|
|
57
|
d.grazepoints = 2.5;
|
|
58
|
d.target = target;
|
|
59
|
}
|
|
60
|
else
|
|
61
|
{
|
|
62
|
d = instance_create(x, y, obj_incense_bullet);
|
|
63
|
d.sprite_index = spr_incense_turtle_smoke_bullet;
|
|
64
|
d.direction = 270 + rng_angle;
|
|
65
|
d.speed = 1.5;
|
|
66
|
d.gravity_direction = direction;
|
|
67
|
d.friction = -0.05;
|
|
68
|
d.depth = obj_heart.depth - 1;
|
|
69
|
d.spin = 1;
|
|
70
|
d.spinspeed = 1;
|
|
71
|
d.grazepoints = 2;
|
|
72
|
d.damage = damage;
|
|
73
|
d.target = target;
|
|
74
|
d = instance_create(x, y, obj_incense_bullet);
|
|
75
|
d.sprite_index = spr_incense_turtle_smoke_bullet;
|
|
76
|
d.direction = (270 + rng_angle) - 15;
|
|
77
|
d.speed = 3.5;
|
|
78
|
d.gravity_direction = direction - 90;
|
|
79
|
d.friction = -0.05;
|
|
80
|
d.depth = obj_heart.depth - 1;
|
|
81
|
d.spin = 1;
|
|
82
|
d.spinspeed = 1;
|
|
83
|
d.damage = damage;
|
|
84
|
d.target = target;
|
|
85
|
d.grazepoints = 2;
|
|
86
|
d = instance_create(x, y, obj_incense_bullet);
|
|
87
|
d.sprite_index = spr_incense_turtle_smoke_bullet;
|
|
88
|
d.direction = 270 + rng_angle + 15;
|
|
89
|
d.speed = 3.5;
|
|
90
|
d.gravity_direction = direction + 90;
|
|
91
|
d.friction = -0.05;
|
|
92
|
d.depth = obj_heart.depth - 1;
|
|
93
|
d.spin = 1;
|
|
94
|
d.spinspeed = -1;
|
|
95
|
d.damage = damage;
|
|
96
|
d.target = target;
|
|
97
|
d.grazepoints = 2;
|
|
98
|
}
|
|
99
|
if (con == 0)
|
|
100
|
con = 1;
|
|
101
|
else
|
|
102
|
con = 0;
|
|
103
|
}
|