Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Keyboard control (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: Progressbar
Next thread: Was: Re: How to get a 'human understandable' direction out of


[ANN] Preview of RBD 2.4   -   Marc Zeedar
  Keyboard control   -   Martin Fitzgibbons
   Re: Keyboard control   -   Lars Jensen
    Re: Keyboard control   -   Martin Fitzgibbons

Keyboard control
Date: 07.03.05 03:50 (Mon, 7 Mar 2005 13:50:02 +1100)
From: Martin Fitzgibbons
What approach is needed to stop a player holding a key down and halting
the game play if I am using the space bar for a certain action trigger
as well as the arrow keys.

Or how do I monitor multiple key downs, say for a 2 player game?

=?D3D?D3D?D3D?D3D?D3D?D3D?DMartin Fitzgibbons
Rush Software
http://www.rushsoftware.com.au
http://www.crosswordwizard.com.au

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Keyboard control
Date: 07.03.05 04:04 (Sun, 06 Mar 2005 22:04:58 -0500)
From: Lars Jensen
> What approach is needed to stop a player holding a key down and halting
> the game play if I am using the space bar for a certain action trigger
> as well as the arrow keys.

I don't quite understand this question...why would holding a key down halt
the gameplay?

> Or how do I monitor multiple key downs, say for a 2 player game?

Use Keyboard.AsyncKeyDown, which tells you whether a given key is down or
not at the time of the call, and then proceeds without waiting for the user
to press or release anything. (Perhaps that's what you meant above.)

The trick with AsyncKeyDown is to know what keycodes correspond to what
keys. For more info, read this article:

http://www.rbdeveloper.com/browse/3.2/3212/

or just download the demo and read the comments in the code.

lj
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Keyboard control
Date: 07.03.05 05:08 (Mon, 7 Mar 2005 15:08:17 +1100)
From: Martin Fitzgibbons
Lars

Thanks, yes I was a bit tongue tied with the first part of the question
but that is what I was after

Martin

>> What approach is needed to stop a player holding a key down and
>> halting
>> the game play if I am using the space bar for a certain action trigger
>> as well as the arrow keys.
>
> I don't quite understand this question...why would holding a key down
> halt
> the gameplay?
>
>> Or how do I monitor multiple key downs, say for a 2 player game?
>
> Use Keyboard.AsyncKeyDown, which tells you whether a given key is down
> or
> not at the time of the call, and then proceeds without waiting for the
> user
> to press or release anything. (Perhaps that's what you meant above.)
>
> The trick with AsyncKeyDown is to know what keycodes correspond to what
> keys. For more info, read this article:
>
> http://www.rbdeveloper.com/browse/3.2/3212/
>
> or just download the demo and read the comments in the code.
>
> lj
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>