Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ytterbium on Fri 23/01/2004 02:29:52

Title: ProcessClick not Processing Click!
Post by: Ytterbium on Fri 23/01/2004 02:29:52
I've created a 10th cursor mode and set a command for ProcessClick to process cursor mode 10. Except it doesn't work. When I change the line to use other cursor modes, it works fine. I also set mode 10 to be a normal cursor so I could test it, and it worked fine that way. However, when I try to run this one line which has everything in common with another line that works except it runs cursor mode 10 rather than 9, it doesn't work. What's going on?
Title: Re:ProcessClick not Processing Click!
Post by: Scorpiorus on Sat 24/01/2004 00:31:17
The 10th mode (and all that greater than) would trigger on any click event only, check if you have any assigned.
Title: Re:ProcessClick not Processing Click!
Post by: Ytterbium on Sat 24/01/2004 00:51:46
Quote from: Scorpiorus on Sat 24/01/2004 00:31:17
The 10th mode (and all that greater than) would trigger on any click event only, check if you have any assigned.

I do. And it seems to work when I temporarily set the 10th cursor to an active mode and use it directly.

Speaking of which...

I think I've thought of a workaround. It seems to work when the cursor mode it GetCursorMode(), so if I set the cursor mode to 10 for a millesecond so it can process it, then set it back to normal...

YES! It worked! It might jack up the system requirements about 30 Mhz, but it's a small price to pay for the interface to work.

Thank you for inspiring intelligence in me!
Title: Re:ProcessClick not Processing Click!
Post by: Pumaman on Sat 24/01/2004 20:21:29
Can you clarify the problem?

I created a mode 10, not set as a standard mode, and added this to on_key_press:

if (keycode == 'T') ProcessClick(character[EGO].x, character[EGO].y - 5, 10);

and it ran EGO's Any Click event without problems.
Title: Re:ProcessClick not Processing Click!
Post by: Ytterbium on Sun 25/01/2004 23:01:00
Quote from: Pumaman on Sat 24/01/2004 20:21:29
Can you clarify the problem?

I created a mode 10, not set as a standard mode, and added this to on_key_press:

if (keycode == 'T') ProcessClick(character[EGO].x, character[EGO].y - 5, 10);

and it ran EGO's Any Click event without problems.


The thing is, the action I'm trying to trigger is from a special menu I set up that appears when you click the middle mouse button. Therefore, when you click the mouse button, the menu appears and mouse.x and mouse.y are set to Midclick_x and Midclick_y. So...

ProcessClick(Midclick_x, Midclick_y, 10);

...didn't work. But I made a workaround...

SetCursorMode(10);
ProcessClick(Midclick_x, Midclick_y, GetCursorMode());
SetCursorMode(MODE_LOOK);

For some reason it only works that way. Bug?
Title: Re:ProcessClick not Processing Click!
Post by: Pumaman on Sat 31/01/2004 13:58:23
strange - those two blocks of code should do exactly the same thing, and they do for me in my testing. hmm.