nnn1czech
Member
Nice day,
I do not speak English very well. Translated text online translator.
I was looking for, but I did not understand the answer or did not find. I tried different things. I read a few questions here on the forum. It did not help.
I have created object control. Code circumscribed from here:
https://forum.yoyogames.com/index.p...with-mouse-advanced-options.11852/#post-79635
I do not understand how to use the code: ds_list_find_index(list, inst.object_index)
I do not understand what the part in brackets "list". I have somewhere to include additional code that activates this? What? What to in write it?
I want the player to take the mouse only one object. Even if several objects to each other. I have several objects with one parent (obj_clothes1).
Please, what should I do?
Codes in obj_clothes1
In Create Event
selected = false;
xx = 0;
yy = 0;
In Event Steep:
if (selected == false)
{
exit;
}
else
{
x = mouse_x + xx;
y = mouse_y + yy;
}
In Event Mouse: Left Pressed:
selected = true;
depth = -1;
xx = x - mouse_x;
yy = y - mouse_y;
In Event Mouse: Left Released:
selected = false;
I do not speak English very well. Translated text online translator.
I was looking for, but I did not understand the answer or did not find. I tried different things. I read a few questions here on the forum. It did not help.
I have created object control. Code circumscribed from here:
https://forum.yoyogames.com/index.p...with-mouse-advanced-options.11852/#post-79635
I do not understand how to use the code: ds_list_find_index(list, inst.object_index)
I do not understand what the part in brackets "list". I have somewhere to include additional code that activates this? What? What to in write it?
I want the player to take the mouse only one object. Even if several objects to each other. I have several objects with one parent (obj_clothes1).
Please, what should I do?
Codes in obj_clothes1
In Create Event
selected = false;
xx = 0;
yy = 0;
In Event Steep:
if (selected == false)
{
exit;
}
else
{
x = mouse_x + xx;
y = mouse_y + yy;
}
In Event Mouse: Left Pressed:
selected = true;
depth = -1;
xx = x - mouse_x;
yy = y - mouse_y;
In Event Mouse: Left Released:
selected = false;