Register    Login    Forum    FAQ    PinSimDB.org

Board index » Resources » Resources Exchange » Scripting - Help offer or request only




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: nudge count
 Post Posted: Mon Jan 24, 2011 5:27 pm 
Offline

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)..

...


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 5:34 pm 
Online
User avatar

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


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 5:55 pm 
Offline

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..:D


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 5:59 pm 
Offline
User avatar

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 Image
Image
Le prix s'oublie, la qualité reste


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 6:26 pm 
Offline
User avatar

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.


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 6:37 pm 
Offline

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


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 6:41 pm 
Online
User avatar

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


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 6:46 pm 
Offline
User avatar

Joined: Thu Jul 01, 2010 10:06 pm
Posts: 302
Here try this:
http://www.megaupload.com/?d=A503LGH7

It works fast enough not to be effected by the fastest possible string of nudges.


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 6:49 pm 
Offline
User avatar

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 Image
Image
Le prix s'oublie, la qualité reste


Top 
 Profile  
 
 Post subject: Re: nudge count
 Post Posted: Mon Jan 24, 2011 6:51 pm 
Offline
User avatar

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.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

Board index » Resources » Resources Exchange » Scripting - Help offer or request only


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron