| Author |
Message |
|
AnonymousUser
|
Post subject: nudge count Posted: Mon Jan 24, 2011 5:27 pm |
|
Joined: Thu Jul 01, 2010 1:57 am Posts: 1565
|
|
Is it possible to "count" the amount of nudge separatly? like : 3 Left(z), 2 right(é), 4 forward (space)..
...
|
|
 |
|
 |
|
Glxb
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 5:34 pm |
|
Joined: Wed Jul 14, 2010 3:55 pm Posts: 2829
|
|
The only way i can think is to put in a if keypressed statement and add to a number that way.
ie (can't remember the syntax exactly)
dim leftnudge ' at start of script
if keycode = getcode(leftnudge) then leftnudge = leftnudge + 1 end if
hope that helps.
GLXB
_________________ Follow me on twitter. @GLXB Youtube channel: http://www.youtube.com/user/GLXBandHigh ... ature=mhee
|
|
 |
|
 |
|
AnonymousUser
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 5:55 pm |
|
Joined: Thu Jul 01, 2010 1:57 am Posts: 1565
|
yes..but i was more looking for the right syntax and the right keypress event.. 
|
|
 |
|
 |
|
Popotte
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 5:59 pm |
|
Joined: Fri Jul 02, 2010 4:50 am Posts: 505 Location: Paris - France
|
|
It's a little bit more complicated as nudging is dealed by the program and as you have a "wait" period between two nudges (you can't nudge twice in a very short time or, to be exact, only the first nudge is done). According to the FP help:
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.
So, I think you have to be imaginative, Steve...
_________________ Les cons ça ose tout. C'est même à ça qu'on les reconnaît.My tables avalaible at http://www.pinsimdb.org/fpreleases/ or  Le prix s'oublie, la qualité reste
|
|
 |
|
 |
|
Pinbotic
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 6:26 pm |
|
Joined: Thu Jul 01, 2010 10:06 pm Posts: 302
|
|
Make a simple kicker mech underneath the apron. Have a ball in the centre of the two kickers and when the table is nudged it will fall into one. Add one to the counter, destroy ball, and make a new one between the two kickers.
|
|
 |
|
 |
|
AnonymousUser
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 6:37 pm |
|
Joined: Thu Jul 01, 2010 1:57 am Posts: 1565
|
|
I don't understand any of your explanations guys..I should be really off today..
If (KeyCode = GetKeyCode(NudgeUpKey)) Then /// does absolutely nothing..
i simply tried:
Dim myVar sub FuturePinball_KeyPressed( byVal KeyCode ) If (KeyCode = GetKeyCode(NudgeUpKey)) Then myVar=myVar+1 end if end sub
|
|
 |
|
 |
|
Glxb
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 6:41 pm |
|
Joined: Wed Jul 14, 2010 3:55 pm Posts: 2829
|
Steve wrote: I don't understand any of your explanations guys..I should be really off today..
If (KeyCode = GetKeyCode(NudgeUpKey)) Then /// does absolutely nothing..
i simply tried:
Dim myVar sub FuturePinball_KeyPressed( byVal KeyCode ) If (KeyCode = GetKeyCode(NudgeUpKey)) Then myVar=myVar+1 end if end sub Thats what I would have tried and tried to explain, but if it doesn't work then I haven't a clue.  GLXB
_________________ Follow me on twitter. @GLXB Youtube channel: http://www.youtube.com/user/GLXBandHigh ... ature=mhee
|
|
 |
|
 |
|
Pinbotic
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 6:46 pm |
|
Joined: Thu Jul 01, 2010 10:06 pm Posts: 302
|
|
 |
|
 |
|
Popotte
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 6:49 pm |
|
Joined: Fri Jul 02, 2010 4:50 am Posts: 505 Location: Paris - France
|
|
The nudge keys are not reported to the script, so you can't write If (KeyCode = GetKeyCode(NudgeUpKey)) Then ... Pinbotic's method is smart but you can test only right or left nudge. Somewhere under the apron an area with three kickers: one at left, one at right and the last at center and unrendered. When you nudge (left or right), the ball goes into one of the two kicker Sub KickerRight_Hit() NufgeRight = NudgeRight+ 1 KickerRight.DestroyBall: KickerCenter.CreateCaptiveBall End Sub And the other sub changing all the Right by Left And, at start of the table: KickerCenter.CreateCaptiveBall Captive ball in order to avoid camera zooming
_________________ Les cons ça ose tout. C'est même à ça qu'on les reconnaît.My tables avalaible at http://www.pinsimdb.org/fpreleases/ or  Le prix s'oublie, la qualité reste
|
|
 |
|
 |
|
Pinbotic
|
Post subject: Re: nudge count Posted: Mon Jan 24, 2011 6:51 pm |
|
Joined: Thu Jul 01, 2010 10:06 pm Posts: 302
|
Popotte, you must have been typing while I was building.  I made a three kicker system in the post above.
|
|
 |
|
 |
|