function collisions_startup()
{
wait (3);
var coords1_x, coords1_y;
var format, pixel1;
COLOR pixel1_color;
while (1)
{
// This check the bottom of the player sprite
coords1_x = 700;
if (coords1_x <= (my_player.pos_x + bmap_width(player_tga)))
{
coords1_x = my_player.pos_x + bmap_width(player_tga) - 40;
}
if (coords1_x >= (my_player.pos_x + bmap_width(player_tga)))
{
coords1_x = my_player.pos_x + bmap_width(player_tga);
}
coords1_y = my_player.pos_y + 40;
format = bmap_lock (level_tga, 0);
pixel1 = pixel_for_bmap(level_tga, coords1_x, coords1_y);
pixel_to_vec (pixel1_color, NULL, format, pixel1);
if (pixel1_color.red == 255)
{
my_player.pos_y -= 2;
}
bmap_unlock (level_tga);
wait (1);
}
}