Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Masked Guardian on Thu 10/07/2008 21:54:42

Title: Help with "any click to hotspot" function (SOLVED)
Post by: Masked Guardian on Thu 10/07/2008 21:54:42
I don't know if it's a bug, but i really can't find out what's going on.. (i've downloaded the latest version --this with the service pack1).

In scripting i have these lines:

function hHotspot0_AnyClick()
{
  Display("Nope");
}

Character is hidden. And it just doesn't works!! I click but nothing! This happens also if i insert this or similar script that conserns "any click" or "interect" functionsto e.g. hotspot 1.

I just don't know what is going wrong!! ???

Thanks for your time!
Title: Re: Help with "any click to hotspot" function
Post by: Makeout Patrol on Thu 10/07/2008 22:16:53
Are you sure that it's set up properly in the room window? If you go to the Room X window and click on the lightning bolt, you will see a list of interactions, but you need to put the name of the function in the corresponding field in order for the function to work. If the "Any click on hotspot" field is blank, your hHotspot0_AnyClick() function is not being called when the player clicks on it. You can type out the name of the function in this field manually, or AGS will fill it out automatically and take you to the roomx.asc window if you click the "..." button in the field.
Title: Re: Help with "any click to hotspot" function
Post by: Masked Guardian on Thu 10/07/2008 23:06:38
Yeah i am sure and i checked it again that the name of the function (without () ) is set properly in the corresponding field. The interaction "move cursor over hotspot" works fine though. The problem is with "any click"

I just can't understand what's going on! :(
Title: Re: Help with "any click to hotspot" function
Post by: Khris on Thu 10/07/2008 23:55:46
Hotspot 0 is the area surrounding the actual hotspots. You should see the message if you click outside a hotspot, using e.g. the look or interact cursor. (The walk cursor doesn't trigger "any click".)

Always make sure you have selected the correct hotspot from the dropdown menu before creating events.
Title: Re: Help with "any click to hotspot" function
Post by: Masked Guardian on Thu 10/07/2008 23:59:25
It's the correct. Also the problem isn't only to the hotspot 0 but all hotspots have the same problem!
Title: Re: Help with "any click to hotspot" function
Post by: Masked Guardian on Fri 11/07/2008 00:02:05
Also the function "mouse over hotspot" works fine. But function "any click" just doesn't work! ??? ???
Title: Re: Help with "any click to hotspot" function
Post by: Khris on Fri 11/07/2008 00:06:44
How did you hide the player character?
Also, in General settings, under Text output, what did you set "Always display text as speech" to?
Title: Re: Help with "any click to hotspot" function
Post by: Masked Guardian on Fri 11/07/2008 10:13:19
In the option of room i set "showplayercharacter" to false.

In General Settings the "always display text as speech" is false.
..

To be more specific: there is a room with some hotspots. Character is not visible and i have disabled the "look at" and "talk to". When player enters, i run the command "Mouse.mode=eModeInteract". The functions "move over hotspot" work perfectly. But functions "any click hotspot" or "interact hotspot" just doesn't work ???

I think i had faced the same problem with 2.72 and i was forced to use objects instead of hotspots!

Oh, i think i should tell also that in some circumstances, with the "mouse move over hotspot" function, the background frame is changed, but that i think it doesn't matter 'cause the hotspots are not affected.

Strange :P
Title: Re: Help with "any click to hotspot" function
Post by: Khris on Fri 11/07/2008 13:00:40
What happens if you put code in an interact event?
Title: Re: Help with "any click to hotspot" function
Post by: Masked Guardian on Fri 11/07/2008 14:47:30
It happens the same thing :( it just doesn't work.
Title: Re: Help with "any click to hotspot" function
Post by: Khris on Fri 11/07/2008 18:03:05
I'm at a loss here. Could you upload the source? (Delete the .exe's in the compiled and debug dirs, then pack it with winrar, best compression.)
Title: Re: Help with "any click to hotspot" function
Post by: Maverick on Fri 11/07/2008 22:52:44
Do you perhaps have an object in the same spot as the hotspot? I know in 2.72 you have to set obj[].clickable to false if that is the case or else it won't work.
Title: Re: Help with "any click to hotspot" function
Post by: Masked Guardian on Sun 13/07/2008 08:05:04
I had a lack of internet these days, so i couldn't answer earlier.. sorry but i acted completely as a newbie :-\ :-X

I used the command "DisableInterface()", because i thought it just disables GUIs. That's why i couldn't click anything :(

Anyway, i really appreciate your interest for help ;)