D
Darth Raven
Guest
Hello!
I'm trying to avoid to drag multiple instances. I pretend to only move instance, and if it meets the other instance, both will return to their places.
This instances have no sprite so I can't use place_meeting. I'm trying to use the var "with":
At the object "ThisO1":
step event:
drag = (image_alpha==1)&&mouse_check_button(mb_left);
....
if drag
{
with (IsO) {drag= 0}
x = mouse_x;
y = mouse_y;
}
The object "IsO" has a similiar code for drag. I'm trying to call the variable drag from IsO, but I can move both if I drag the object " ThisO1" into "IsO".
I'm trying to avoid to drag multiple instances. I pretend to only move instance, and if it meets the other instance, both will return to their places.
This instances have no sprite so I can't use place_meeting. I'm trying to use the var "with":
At the object "ThisO1":
step event:
drag = (image_alpha==1)&&mouse_check_button(mb_left);
....
if drag
{
with (IsO) {drag= 0}
x = mouse_x;
y = mouse_y;
}
The object "IsO" has a similiar code for drag. I'm trying to call the variable drag from IsO, but I can move both if I drag the object " ThisO1" into "IsO".