I probably used wrong wording in the title, but here's what I'm looking for:
there are several things in my game that apply to every hotspot/object (actually, I guess that's the case in almost every game).
like using whatever inventory item on whatever object/hotspot.
I defined lots of them, but I wonder if there's a way to add something to the GlobalScript, that comes into action if I didn't specify anything else in the room script? the character would just say something like "nope" or "can't use that here".
(hope I made myself clear)
similar to the above: is there a way to make ALL objects unclickable? (I'm sure there is and it's a veeery basic thing to know. so the question should be: what's the code for it?) I only use hotspots for interactions and it's a little annoying to manually make each object unclickable.
There's a built-in function called unhandled_event (http://www.adventuregamestudio.co.uk/manual/index.html?page=ags42.htm#textscriptevents) for this (bottom of the page).
You can also create completely custom global controls by using Game.GetLocationType, the various .GetAtScreenXY functions, and rewriting on_mouse_click.
Making all objects unclickable:
function on_event(EventType event, int data) {
if (event == eEventBeforeFadein) {
int i;
while (i < Room.ObjectCount) {
object[i].Clickable = false;
i++;
}
}
}
As so many times before: Khris saves the day.
Thanks a lot!