Author Topic: Key Capture Problem  (Read 4502 times)

0 Members and 1 Guest are viewing this topic.

Offline Andrew_Baker

Key Capture Problem
« 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.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »


I hope you realize that one day I will devour the Earth.

Offline Chris Cromer

Re: Key Capture Problem
« Reply #1 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.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Andrew_Baker

Re: Key Capture Problem
« Reply #2 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!

« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
I hope you realize that one day I will devour the Earth.

Offline Andrew_Baker

Re: Key Capture Problem
« Reply #3 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.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
I hope you realize that one day I will devour the Earth.

Offline Nick Sonneveld

Re: Key Capture Problem
« Reply #4 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
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Andrew_Baker

Re: Key Capture Problem
« Reply #5 on: March 25, 2002, 03:28:23 PM »
All right, Nick.  You can both be my hero.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
I hope you realize that one day I will devour the Earth.

Offline Nick Sonneveld

Re: Key Capture Problem
« Reply #6 on: March 25, 2002, 04:09:01 PM »
um.. thanks. :)

- Nick
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Chris Cromer

Re: Key Capture Problem
« Reply #7 on: March 25, 2002, 04:25:12 PM »
Yeah what he said... thanks :)
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.047 seconds with 17 queries.