Help with "any click to hotspot" function (SOLVED)

Started by Masked Guardian, Thu 10/07/2008 21:54:42

Previous topic - Next topic

Masked Guardian

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!

Makeout Patrol

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.

Masked Guardian

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! :(

Khris

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.

Masked Guardian

It's the correct. Also the problem isn't only to the hotspot 0 but all hotspots have the same problem!

Masked Guardian

Also the function "mouse over hotspot" works fine. But function "any click" just doesn't work! ??? ???

Khris

How did you hide the player character?
Also, in General settings, under Text output, what did you set "Always display text as speech" to?

Masked Guardian

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

Khris

What happens if you put code in an interact event?

Masked Guardian

It happens the same thing :( it just doesn't work.

Khris

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.)

Maverick

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.

Masked Guardian

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 ;)

SMF spam blocked by CleanTalk