Quote from: RootBound on Sun 04/06/2023 15:47:231-click controls can be pretty easy to implement, right? You basically do something like this?
That looks more like a code for changing cursor graphic depending on a location kind. If you change modes like that, then you will have to remember to create specific events for each object type, which may be confusing.
For a trivial case you only need on_mouse_click:
function on_mouse_click(MouseButton button) {
if (button == eMouseLeft) {
if (GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
Room.ProcessClick(mouse.x, mouse.y, eModeWalkto);
} else {
Room.ProcessClick(mouse.x, mouse.y, eModeInteract);
}
}
}
Above requires to create Interact event function for any hotspot, regardless of their kind.