Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Tue 19/05/2020 11:31:40

Title: Why is this object not responding?
Post by: bx83 on Tue 19/05/2020 11:31:40
Hi all

I have an object on screen. It's visible and clickable. I have a method for interact. I've tried it with baseline being where it is, and baseline being 768 (max height of screen). I can't get it to respond with any click, and with interact, the cursor icon doesn't change (indicating that it doesn't have a 'Interact' interaction... except it does). It doesn't even come up with it's own title (all objects in the game with a Description property have it displayed in the upper screen when moused-over). It doesn't have any hotspot's on top of it. It doesn't have a menu on top of it (the menu is invisible anyway).

Why is it not clickable, or doesn't even respond to anything?
Title: Re: Why is this object not responding?
Post by: Slasher on Tue 19/05/2020 11:45:34
Something must be in the way and stopping the clicks which includes description. Provided that the clicking is scripted into the function right..
You say the gui menu is invisible and over object... is gui menu clickable=true?   because if it is it may be stopping the click throughs..

Title: Re: Why is this object not responding?
Post by: Khris on Tue 19/05/2020 11:50:33
Yes, a GUI with a transparency of 100 will still intercept clicks afaik (because the engine only does a coordinate check).
Title: Re: Why is this object not responding?
Post by: bx83 on Tue 19/05/2020 12:09:49
Yes I've discovered this also - but how do I get the icon bar (1366x70 bar at top of screen) to *stop* capturing clicks? I've it gIconbar.Visible=false, which means you can't see it, but it's still there :/
Title: Re: Why is this object not responding?
Post by: Khris on Tue 19/05/2020 12:17:00
If .Visible is false, it shouldn't capture clicks. Which means there's some other GUI.

You can add this to your global script

Code (ags) Select
function on_event(EventType event, int data) {
  if (event == eEventGUIMouseDown) Display("click on GUI #%d", data);
}


(or just add line 2 inside if the function already exists)
Title: Re: Why is this object not responding?
Post by: bx83 on Tue 19/05/2020 12:36:27
Which fnuction should I add it to in globalscript? Repeat_always? Not sure what you mean. I already have a on_event in globalscript?..
Title: Re: Why is this object not responding?
Post by: bx83 on Tue 19/05/2020 12:42:51
Aha, Got it. It's FloatingText, the gui used for the text of an objects Description field. Well now I'm in a pickle.
Title: Re: Why is this object not responding?
Post by: Khris on Tue 19/05/2020 12:45:26
Not really, because you can just set the GUI's .Clickable to false (which it should be anyway).
Title: Re: Why is this object not responding?
Post by: bx83 on Tue 19/05/2020 12:48:55
Solved :D  Just made floatingText unclickable.
Thank you :)
Title: Re: Why is this object not responding?
Post by: Crimson Wizard on Tue 19/05/2020 14:45:03
Similar thing happened to me once when I made a custom cursor out of GUI... so I ended up clicking on my own cursor, according to AGS.