Community

AGI Programming => Mega Tokyo AGI Archive => Topic started by: Andrew_Baker on March 24, 2002, 03:23:40 AM

Title: Key Capture Problem
Post by: Andrew_Baker on March 24, 2002, 03:23:40 AM
In Voodoo Girl, I've created some interaction screens where I use the ego as a virtual mouse.  I need to use a function key or something to "click" on objects.  How do I do this?  I checked the help docs before posting, but I couldn't find what I was looking for.

Any help would be greatly appreciated, yo.
Title: Re: Key Capture Problem
Post by: Chris Cromer on March 24, 2002, 04:56:52 AM
Well you could just set up a key like f10 or something so that when f10 is pressed and the "virtual mouse" is in the correct positions then it will have clicked it.

To set up the key you want to use go into logic.091 and use the other keys as an example on how to set it up.

Good luck tell me if you need any help with it.
Title: Re: Key Capture Problem
Post by: Andrew_Baker on March 24, 2002, 11:16:26 AM
Yessir, you're absolutely right, but now I have another weird problem.

Now the game thinks I'm pushing f10 all the time...  I used the line if (controller(left_click)) {....}, and I also tried using the controller number.      My Logic.91 code is as such: set.key(0, 68, left_click);  //clicking on item in interface screen.

Yet again, I made sure to check the help docs before I asked, but it made no mention.

AGISCI, you're my hero!

Title: Re: Key Capture Problem
Post by: Andrew_Baker on March 24, 2002, 11:25:54 AM
HAHAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHA!
HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH!
(wipes tears out of eyes)

Funny thing...  if you assign c50 in defines.txt, and then try to use that controller in your game, it will always return true.  That's an interesting artifact...  too bad it's useless.  So anyway, I reassigned left_click to c49, and it works perfectly.

AGISCI, you really are my hero.  Now I can finish my game.
Title: Re: Key Capture Problem
Post by: Nick Sonneveld on March 24, 2002, 06:45:46 PM
There's actually a hardcoded limit in the interpreter for the number of controllers.. I think you hit the limit of 50 but I'll have to check the nagi source to find out what it actually is.

The compiler should check this limit.. I guess the author had no way of knowing what the actual limit was though.. so I'll let him off this time. :)

- Nick
Title: Re: Key Capture Problem
Post by: Andrew_Baker on March 25, 2002, 03:28:23 PM
All right, Nick.  You can both be my hero.
Title: Re: Key Capture Problem
Post by: Nick Sonneveld on March 25, 2002, 04:09:01 PM
um.. thanks. :)

- Nick
Title: Re: Key Capture Problem
Post by: Chris Cromer on March 25, 2002, 04:25:12 PM
Yeah what he said... thanks :)