A
Artwark
Guest
I'm tasked to make a button_object that when it is clicked, an object should appear at a random direction both horizontally, vertically and diagonally with the same speed value.
move_random(1,1);
if random(10) >= 9
{
hspeed = 5;
}
else if random(10) <= 9
{
vspeed = 5;
}
If I apply this, the object comes randomly both horizontal & vertical but it doesn't come diagonally.
how do I fix this?
move_random(1,1);
if random(10) >= 9
{
hspeed = 5;
}
else if random(10) <= 9
{
vspeed = 5;
}
If I apply this, the object comes randomly both horizontal & vertical but it doesn't come diagonally.
how do I fix this?