sBird
0
-1
-5
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
///Initialize
image_speed = 0;
image_blend = choose(c_red, c_blue, c_green, c_yellow);
sound = noone;
1
603
7
0
0
-1
2
self
0
0
1
///Peck and fly away
if(vspeed == 0) {
if(!irandom(90)) {
image_speed = 1/3;
}
if((distance_to_object(Player) <= 32 && Player.speed != 0) || Controller.shake) {
vspeed = -4;
hspeed = 2 * sign(x - Player.x);
if(hspeed < 0) {
image_xscale = -1;
}
sprite_index = sBirdFly;
image_speed = 1/3;
if(sound == noone) {
sound = audio_play_sound(aBird, 0, false);
audio_sound_gain(sound, 0.1, 0);
}
}
}
1
603
7
0
0
-1
2
self
0
0
1
///Peck once only
if(sprite_index == sBird) {
image_speed = 0;
}
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
0,0
4,4