V
Viggar
Guest
hello, I've stumbled on a problem that seems really simple, but I can't wrap my head around it.
I want to make a simple object that returns to the player after it flies a certain distance or hits a wall, but the collision is always inconsistent and it bounces off the walls like ping pong.
this is the code for the player step event:
{
var box, ID;
if image_xscale == 1
box = bbox_left;
else
box = bbox_right;
ID = instance_create (box+image_xscale*6, y+2, obj_pizza)
ID.hsp = image_xscale * 6;
isShoot = true;
alarm[0] = 20;
}
and the create and the alarm [0] event code:
// throwing
isShoot = false;
I want to make a simple object that returns to the player after it flies a certain distance or hits a wall, but the collision is always inconsistent and it bounces off the walls like ping pong.
this is the code for the player step event:
{
var box, ID;
if image_xscale == 1
box = bbox_left;
else
box = bbox_right;
ID = instance_create (box+image_xscale*6, y+2, obj_pizza)
ID.hsp = image_xscale * 6;
isShoot = true;
alarm[0] = 20;
}
and the create and the alarm [0] event code:
// throwing
isShoot = false;