|
1
|
if (con == 0)
|
|
2
|
{
|
|
3
|
if (y < (cameray() + 40))
|
|
4
|
{
|
|
5
|
y = lerp(y, cameray() + 60, 0.2);
|
|
6
|
}
|
|
7
|
else
|
|
8
|
{
|
|
9
|
con = 1;
|
|
10
|
timer = 0;
|
|
11
|
}
|
|
12
|
}
|
|
13
|
if (con == 1)
|
|
14
|
{
|
|
15
|
siner += sineradd;
|
|
16
|
x = xstart + (sin(siner / 10) * 70);
|
|
17
|
image_angle = sin(siner / 6) * 20;
|
|
18
|
vspeed = sin(siner / 4) * 8;
|
|
19
|
timer++;
|
|
20
|
if (timer >= 8)
|
|
21
|
{
|
|
22
|
timer = 0;
|
|
23
|
shot = instance_create(x, y, obj_regularbullet);
|
|
24
|
if (i_ex(shot))
|
|
25
|
{
|
|
26
|
shot.sprite_index = spr_clubsbullet_dark;
|
|
27
|
shot.image_angle = -90;
|
|
28
|
shot.speed = 6 + (vspeed / 4);
|
|
29
|
shot.active = 1;
|
|
30
|
shot.image_angle = image_angle - 90;
|
|
31
|
shot.direction = image_angle - 90;
|
|
32
|
shot.target = target;
|
|
33
|
shot.damage = damage;
|
|
34
|
shot.grazepoints = 6;
|
|
35
|
}
|
|
36
|
scr_bullet_inheritscr_bullet_inherit
function scr_bullet_inherit(arg0)
{
if (i_ex(arg0))
{
if (damage != -1)
arg0.damage = damage;
if (grazepoints != -1)
arg0.grazepoints = grazepoints;
if (timepoints != -1)
arg0.timepoints = timepoints;
if (inv != -1)
arg0.inv = inv;
if (target != -1)
arg0.target = target;
if (grazed != -1)
arg0.grazed = 0;
if (grazetimer != -1)
arg0.grazetimer = 0;
if (object_index == obj_dbulletcontroller)
{
arg0.creatorid = creatorid;
arg0.creator = creator;
}
arg0.element = element;
}
}
function scr_bullet_inherit_from(arg0, arg1, arg2 = -1, arg3 = -1)
{
if (i_ex(arg0) && i_ex(arg1))
{
if (arg2 == -1)
arg0.damage = global.monsterat[arg1.myself] * 5;
else
arg0.damage = arg2;
if (arg3 == -1)
arg0.grazepoints = arg1.grazepoints;
else
arg0.grazepoints = arg3;
arg0.timepoints = arg1.timepoints;
arg0.inv = arg1.inv;
arg0.target = arg1.mytarget;
arg0.grazed = 0;
arg0.grazetimer = 0;
arg0.element = arg1.element;
if (object_index == obj_dbulletcontroller)
{
arg0.creatorid = creatorid;
arg0.argument0.creator = creator;
}
}
} (shot);
|
|
37
|
}
|
|
38
|
}
|
|
39
|
if (con == 2)
|
|
40
|
{
|
|
41
|
if (y > (cameray() - 30))
|
|
42
|
y = lerp(y, cameray() - 30, 0.3);
|
|
43
|
destroytimer++;
|
|
44
|
if (destroytimer == 30)
|
|
45
|
instance_destroy();
|
|
46
|
}
|