sButterfly
0
-1
-5
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
///Choose a colour
image_speed = 2/3;
image_blend = choose(c_red, c_blue, c_green, c_yellow);
move = true;
1
603
7
0
0
-1
2
self
0
0
1
///Move around
if(move) {
var xmin = -2, xmax = 2;
var ymin = -2, ymax = 2;
if(distance_to_object(Player) < 48) {
if(abs(x - Player.x) < abs(y - Player.y)) {
if(x > Player.x) {
xmin += 3;
xmax += 3
} else if(x <= Player.x) {
xmin -= 3;
xmax -= 3;
}
} else {
if(y > Player.y) {
ymin += 3;
ymax += 3;
} else if(y <= Player.y) {
ymin -= 3;
ymax -= 3;
}
}
} else if(distance_to_point(xstart, ystart) >= 32) {
if(abs(x - xstart) > 24) {
if(x > xstart) {
xmax -= 3;
} else {
xmin += 3;
}
}
if(abs(y - ystart) > 24) {
if(y > ystart) {
ymax -= 3;
} else {
ymin += 3;
}
}
}
x += irandom(-xmin + xmax) + xmin;
y += irandom(-ymin + ymax) + ymin;
}
move = !move;
1
603
7
0
0
-1
2
self
0
0
1
///Draw the correct colour or white if not
if(Controller.colours[BLACK]) {
var col = image_blend;
if(!Controller.colours[coltonum(image_blend)]) {
col = c_white;
}
draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, col, image_alpha);
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
0
4,3
4,4