var xpos = 0;
var ypos = 0;
xpos = obj_magnet.x;
ypos = obj_magnet.y;
if (xpos > 435 && xpos < 704 && ypos > 350 && ypos < 640)
{
with(obj_lamp)
{
instance_change(obj_lamp_light, true);
}
if obj_lamp_light.image_index == 5
{
obj_lamp_light.image_speed = 0;
}
with(obj_arrow)
{
instance_change(obj_arrow_move_one_direction, true);
}
if obj_arrow_move_one_direction.image_index == 4
{
obj_arrow_move_one_direction.image_speed = 0;
}
with(obj_arrow_move_opposite_direction)
{
instance_change(obj_arrow, true);
}
exit;
}
else
{
with(obj_lamp_light)
{
instance_change(obj_lamp, true);
}
with(obj_arrow_move_one_direction)
{
instance_change(obj_arrow_move_opposite_direction, true);
if obj_arrow_move_opposite_direction.image_index == 4
{
obj_arrow_move_opposite_direction.image_speed = 0;
}
}
exit;
}
This is a game which I am trying to create where the obj_arrow_move_opposite_direction and obj_arrow_move_one_direction contains 5 sub images and the obj_lamp_light contains 5 sub images.