Widzę, że mój kod jest zupełnie inny i jest strasznie długi... :( Podam wam cały kod, a wy mi wytknijcie wszystkie błędy jakie znajdziecie. To jedyny sposób, żebym się czegoś nauczył. Jest to Pong.
Piłka:
Create:
alarm[0]=50;
Alarm 0:
dir_var=round(random(1));
dir_add=round(random(90));
ball_speed=6;
if (dir_var=0)
{
direction=(45+dir_add);
}
else
{
direction=(225+dir_add);
}
motion_set(direction,ball_speed);
Destroy:
sound_play(Eksplozja);
instance_create(320,240,Pilka);
Colisions Paletka:
if y < other.y + other.sprite_height
{
move_bounce_solid(true);
sound_play(Pong);
}
exit;
Colisions Paletka 2:
if y > other.y - other.sprite_height
{
move_bounce_solid(true);
sound_play(Pong);
}
exit;
Colisions Poziom:
instance_destroy();
Colisions Pion:
move_bounce_solid(true);
sound_play(Pong);
Paletka:
Left:
repeat(8)
if place_free(x-1,y+0)then x = x - 1;
Right:
repeat(8)
if place_free(x+1,y+0)then x = x + 1;
Paletka 2:
A:
repeat(8)
if place_free(x-1,y+0)then x = x - 1;
D:
repeat(8)
if place_free(x+1,y+0)then x = x + 1;
END
Przepraszam, że zajmuje wam czas, ale jestem pewien że w tym kodzie zrobiłem pełno błędów. Już mi Sadam to udowodnił... Proszę o sugestie. Z góry dziękuję! Pozdro!