H
HUMMAN
Guest
Often i make mistakes related to, triggering one specific instance for object, or triggering all of them etc. Are there any good rule of thumbs or i will learn it by experience?
: For example below code, hovering works for any instance which is intented and IT WORKS. white shader gets applied to any instance i hover my mouse. However, when i click IT works ONLY for one specific instance. I dont understand it.
Here is a video clip of the situtation, i did not share other codes since i dont think it is related but if you think so please let me know.
In the video all hovers work, but left click works only for teal instance of same object.
: For example below code, hovering works for any instance which is intented and IT WORKS. white shader gets applied to any instance i hover my mouse. However, when i click IT works ONLY for one specific instance. I dont understand it.
GML:
if(place_meeting(x,y,oCursor))
{
hover=true;
}
else hover=false;
with(oGUI)
{ if (mouse_check_button_pressed(mb_left))
{
if(other.hover)
{
information_ui=true;
}
else
{
information_ui=false;
}
}
}
Here is a video clip of the situtation, i did not share other codes since i dont think it is related but if you think so please let me know.