Jump to content




Photo
- - - - -

Nudging keycodes detecting problem


  • Please log in to reply
1 reply to this topic

#1 Titanic4

Titanic4

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: Poland

  • Favorite Pinball: ‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬Riverboat Gambler

Posted 04 March 2013 - 06:44 PM

I'm trying to make system, which will terminate game as soon as someone nudges table via keyboard.

 

The following variables:

  • NudgeLeftKey
  • NudgeRightKey
  • NudgeUpKey

are listed in FP scripting help topic.

 When used with getkeycode it returns Keycode of bound keys. It's good so far. When I nudge table the detected current/last keycode never changes so it may: 
  1. trigger lockout using err.raise on any other action than nudging
  2. it'll not trigger the lockout at all

So how the hell can i acquire the current keycode after using nudge keys while playing?

 

PS: The FPT in zip file is attached to the post topic. After you begin playing red displays shows current and last detected keycode of pressed key. Green ones shows keycodes bound to each nudge direction key.  How to test: after you begin playing(F5 in editor)press any key(with exception of ESC) and check red displays then begin nudging and also look for any change in red displays.

Attached Files

  • Attached File  w.zip   33.63K   1 downloads

Edited by Titanic4, 04 March 2013 - 09:34 PM.


#2 Popotte

Popotte

    Pinball Fan

  • VIP
  • 658 posts
  • Location:Paris

  • Flag: France

  • Favorite Pinball: World Fair



Posted 05 March 2013 - 11:20 AM

According to the Help File:

 

 

This section give the key codes that the script is able to read in the FuturePinball_KeyPressed( byVal KeyCode ) and FuturePinball_KeyReleased( byVal KeyCode ) global script methods.

Not all keys are available to use used in the Script. Any Keys which have fixed functionality (i.e., Function Keys, Tab, etc.) as described in the Game Key Preferences Section (link) of this manual are not reported to the script. The Exception to this is the Function keys, they can be used in the script providing SHIFT is held down first. Keys assigned to the Table Nudge are also not available.


Les cons ça ose tout. C'est même à ça qu'on les reconnaît.

Posted Image Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users