H
hot2fire
Guest
I try to create a mouse grid system and connect them to the endpoint like that video. First, I try to do a 64 by 64 snap grid and connect other objects. This video is the perfect explain how I wanted everything to look like. However, the download link doesn't work. Which is some BS!
Also, if the yellow circle manages to connect another object, is there a way to code?
For the create event
can = 1; // can i move when i press the button
canalarmset = 8;
canalarm=canalarmset;
snap = 64;
selected = false;
global.canSelect = true;
For the step event
if (selected) {
global.canselect = false;
y=mouse_y;
x=mouse_x;
}
Left mouse button
/// Move object
if (global.canSelect) {
instance_create(x, y, obj_electrical_wire);
selected = true;
}
Global left Released
/// Release mouse
if (global.canSelect) {
selected = false;
instance_destroy();
}
Also, if the yellow circle manages to connect another object, is there a way to code?
For the create event
can = 1; // can i move when i press the button
canalarmset = 8;
canalarm=canalarmset;
snap = 64;
selected = false;
global.canSelect = true;
For the step event
if (selected) {
global.canselect = false;
y=mouse_y;
x=mouse_x;
}
Left mouse button
/// Move object
if (global.canSelect) {
instance_create(x, y, obj_electrical_wire);
selected = true;
}
Global left Released
/// Release mouse
if (global.canSelect) {
selected = false;
instance_destroy();
}
Last edited by a moderator: