|
1
|
if (scr_queen_buffercheckscr_queen_buffercheck
function scr_queen_buffercheck()
{
return instance_exists(obj_queen_buffercontroller) && obj_queen_buffercontroller.buffering == 1;
} ())
|
|
2
|
exit;
|
|
3
|
nextx = x + lengthdir_x(fauxspeed, direction);
|
|
4
|
nexty = y + lengthdir_y(fauxspeed, direction);
|
|
5
|
if (init == 0)
|
|
6
|
{
|
|
7
|
init = 1;
|
|
8
|
hitbox[0].damage = damage;
|
|
9
|
hitbox[1].damage = damage;
|
|
10
|
}
|
|
11
|
var newx = 0;
|
|
12
|
var newy = 0;
|
|
13
|
traillength = 100;
|
|
14
|
if (bouncecount < bouncecap)
|
|
15
|
{
|
|
16
|
if (nextx <= minx && abs(angle_difference(0, direction)) > 90)
|
|
17
|
{
|
|
18
|
newx = minx;
|
|
19
|
if (direction == 180)
|
|
20
|
{
|
|
21
|
newy = y;
|
|
22
|
direction = point_direction(0, 0, choose(1, 2), choose(-2, -1, 1, 2));
|
|
23
|
nexty = y + lengthdir_y(minx - nextx, direction);
|
|
24
|
nextx = minx + lengthdir_x(minx - nextx, direction);
|
|
25
|
}
|
|
26
|
else
|
|
27
|
{
|
|
28
|
direction = scr_reflectscr_reflect
function scr_reflect(arg0, arg1)
{
var reversedir = (arg0 + 180) % 360;
var angledif = angle_difference(arg1, reversedir);
if (angledif >= 90 || angledif <= -90)
return arg0;
return arg1 + angledif;
} (direction, 0);
|
|
29
|
newy = scr_remapvaluescr_remapvalue
function scr_remapvalue(arg0, arg1, arg2, arg3, arg4)
{
if (arg1 == arg0)
return arg3;
var __invLerp = (arg2 - arg0) / (arg1 - arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap(arg0, arg1, arg2, arg3, arg4)
{
var __invLerp = scr_inverselerp(arg1, arg2, arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap_clamped(arg0, arg1, arg2, arg3, arg4)
{
var __remapped_value = remap(arg0, arg1, arg2, arg3, arg4);
return clamp(__remapped_value, arg3, arg4);
} (x, nextx, minx, y, nexty);
|
|
30
|
nextx = minx + (minx - nextx);
|
|
31
|
}
|
|
32
|
bouncecount++;
|
|
33
|
}
|
|
34
|
else if (nextx >= maxx && abs(angle_difference(180, direction)) > 90)
|
|
35
|
{
|
|
36
|
newx = maxx;
|
|
37
|
if (direction == 0)
|
|
38
|
{
|
|
39
|
newy = y;
|
|
40
|
direction = point_direction(0, 0, choose(-1, -2), choose(-2, -1, 1, 2));
|
|
41
|
nexty = y - lengthdir_y(maxx - nextx, direction);
|
|
42
|
nextx = maxx - lengthdir_x(maxx - nextx, direction);
|
|
43
|
}
|
|
44
|
else
|
|
45
|
{
|
|
46
|
newy = scr_remapvaluescr_remapvalue
function scr_remapvalue(arg0, arg1, arg2, arg3, arg4)
{
if (arg1 == arg0)
return arg3;
var __invLerp = (arg2 - arg0) / (arg1 - arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap(arg0, arg1, arg2, arg3, arg4)
{
var __invLerp = scr_inverselerp(arg1, arg2, arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap_clamped(arg0, arg1, arg2, arg3, arg4)
{
var __remapped_value = remap(arg0, arg1, arg2, arg3, arg4);
return clamp(__remapped_value, arg3, arg4);
} (x, nextx, maxx, y, nexty);
|
|
47
|
direction = scr_reflectscr_reflect
function scr_reflect(arg0, arg1)
{
var reversedir = (arg0 + 180) % 360;
var angledif = angle_difference(arg1, reversedir);
if (angledif >= 90 || angledif <= -90)
return arg0;
return arg1 + angledif;
} (direction, 180);
|
|
48
|
nextx = maxx + (maxx - nextx);
|
|
49
|
}
|
|
50
|
bouncecount++;
|
|
51
|
}
|
|
52
|
if (nexty <= miny)
|
|
53
|
{
|
|
54
|
newy = miny;
|
|
55
|
newx = scr_remapvaluescr_remapvalue
function scr_remapvalue(arg0, arg1, arg2, arg3, arg4)
{
if (arg1 == arg0)
return arg3;
var __invLerp = (arg2 - arg0) / (arg1 - arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap(arg0, arg1, arg2, arg3, arg4)
{
var __invLerp = scr_inverselerp(arg1, arg2, arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap_clamped(arg0, arg1, arg2, arg3, arg4)
{
var __remapped_value = remap(arg0, arg1, arg2, arg3, arg4);
return clamp(__remapped_value, arg3, arg4);
} (y, nexty, miny, x, nextx);
|
|
56
|
direction = scr_reflectscr_reflect
function scr_reflect(arg0, arg1)
{
var reversedir = (arg0 + 180) % 360;
var angledif = angle_difference(arg1, reversedir);
if (angledif >= 90 || angledif <= -90)
return arg0;
return arg1 + angledif;
} (direction, 270);
|
|
57
|
nexty = miny + (miny - nexty);
|
|
58
|
bouncecount++;
|
|
59
|
}
|
|
60
|
else if (nexty >= maxy)
|
|
61
|
{
|
|
62
|
newy = maxy;
|
|
63
|
newx = scr_remapvaluescr_remapvalue
function scr_remapvalue(arg0, arg1, arg2, arg3, arg4)
{
if (arg1 == arg0)
return arg3;
var __invLerp = (arg2 - arg0) / (arg1 - arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap(arg0, arg1, arg2, arg3, arg4)
{
var __invLerp = scr_inverselerp(arg1, arg2, arg0);
return lerp(arg3, arg4, __invLerp);
}
function remap_clamped(arg0, arg1, arg2, arg3, arg4)
{
var __remapped_value = remap(arg0, arg1, arg2, arg3, arg4);
return clamp(__remapped_value, arg3, arg4);
} (y, nexty, maxy, x, nextx);
|
|
64
|
direction = scr_reflectscr_reflect
function scr_reflect(arg0, arg1)
{
var reversedir = (arg0 + 180) % 360;
var angledif = angle_difference(arg1, reversedir);
if (angledif >= 90 || angledif <= -90)
return arg0;
return arg1 + angledif;
} (direction, 90);
|
|
65
|
nexty = maxy + (maxy - nexty);
|
|
66
|
bouncecount++;
|
|
67
|
}
|
|
68
|
}
|
|
69
|
x = nextx;
|
|
70
|
y = nexty;
|
|
71
|
if (newx != 0 || newy != 0)
|
|
72
|
{
|
|
73
|
bouncepoint_x[2] = bouncepoint_x[1];
|
|
74
|
bouncepoint_y[2] = bouncepoint_y[1];
|
|
75
|
bouncepoint_x[1] = bouncepoint_x[0];
|
|
76
|
bouncepoint_y[1] = bouncepoint_y[0];
|
|
77
|
bouncepoint_x[0] = newx;
|
|
78
|
bouncepoint_y[0] = newy;
|
|
79
|
}
|
|
80
|
image_angle = point_direction(x, y, bouncepoint_x[0], bouncepoint_y[0]);
|
|
81
|
if (bouncepoint_x[2] < (__view_get(e__VW.XView, 0) - 80))
|
|
82
|
instance_destroy();
|
|
83
|
if (bouncepoint_x[2] > (__view_get(e__VW.XView, 0) + 760))
|
|
84
|
instance_destroy();
|
|
85
|
if (bouncepoint_y[2] < (__view_get(e__VW.YView, 0) - 80))
|
|
86
|
instance_destroy();
|
|
87
|
if (bouncepoint_y[2] > (__view_get(e__VW.YView, 0) + 580))
|
|
88
|
instance_destroy();
|
|
89
|
|
|
90
|
enum e__VW
|
|
91
|
{
|
|
92
|
XView,
|
|
93
|
YView,
|
|
94
|
WView,
|
|
95
|
HView,
|
|
96
|
Angle,
|
|
97
|
HBorder,
|
|
98
|
VBorder,
|
|
99
|
HSpeed,
|
|
100
|
VSpeed,
|
|
101
|
Object,
|
|
102
|
Visible,
|
|
103
|
XPort,
|
|
104
|
YPort,
|
|
105
|
WPort,
|
|
106
|
HPort,
|
|
107
|
Camera,
|
|
108
|
SurfaceID
|
|
109
|
}
|