Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » FAQ & Help




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Script Help needed
 Post Posted: Thu Jul 26, 2018 6:34 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 32
Location: Australia
my new table has a "horse shoe" with a captive ball. The problem is sometimes when the captive ball is hit hard it travels to the other side but bounces back all the way to its starting point, resulting in a double score. The problem with that is each time hitting the captive ball to the other side is supposed to push back the monster with a resulting score, the score increasing each time eventually getting to "special"

How do I script it so if it does bounce back it doesnt double up?


You do not have the required permissions to view the files attached to this post.


Top 
 Profile  
 
 Post subject: Re: Script Help needed
 Post Posted: Fri Jul 27, 2018 2:51 am 
Offline
User avatar

Joined: Mon Sep 21, 2015 10:33 am
Posts: 116
Location: UK - Bridgnorth (Shropshire)
*** I Do Not Program / Script Tables *** ... but do like to understand how various actions etc. are achieved :mrgreen: :D

Could you use a switch on either side of the 'horse shoe', along with associated timers - and use the LastSwitchHit command with them to get the desired outcome?

i.e. if the last switch hit was the "Left" side of the 'horse shoe' - it's associated timer would start... then - if the last switch hit then equals the "right" side of the 'horse shoe' and the "left" timer still running then do not 'push the monster' [hopefully this makes sense?].

Also - I mention the 'Side' of the horse shoe because the captive ball will undoubtedly rest of the end of the '"shoe" on the respective side, which could possibly be easier to script/achieve (in my simple mind anyway... LOL).

I'm sure there will be plenty of ways to script what you would like to achieve, and the authors of tables that still visit the forums could suggest more efficient scripting methods.


Top 
 Profile  
 
 Post subject: Re: Script Help needed
 Post Posted: Sun Jul 29, 2018 5:47 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 32
Location: Australia
all fixed, thanks to advice from Popotte

Made a Timer with a count of 1000ms, then when the trigger is hit, the script checks to see if the timer is enabled, if so then it exits the sub, if not it processes the scoring and the timer isnt enabled until after the scoring. works great!

Code:
If  HorseshoeTimer.Enabled = True or fpTilted = True Then Exit Sub
   
      If H = 0 then LightEffectAttract6(): Li1.State = BulbOff:Li2.State = BulbOn: Score5000: MOVEOctobrainBack1()
      If H = 1 then LightEffectAttract6(): Li2.State = BulbOff:Li3.State = BulbOn: Score10000: MOVEOctobrainBack2()
      If H = 2 then LightEffectAttract6(): Li3.State = BulbOff:Li4.State = BulbOn: Score15000: MOVEOctobrainBack3()
      If H = 3 then LightEffectAttract6(): Li4.State = BulbOff:Li5.State = BulbOn: Score20000: MOVEOctobrainBack4()
      If H = 4 then LightEffectAttract6(): Li4.State = BulbOn: Li5.State = BulbOff: Score50000: MOVEOctobrainBack5(): ScoreSpecialOcto()
      If H = 5 then LightEffectAttract6(): Li4.State = BulbOn: Li5.State = BulbOff: Score50000
      
      H = H + 1

      If H >= 5 then H = 5

   HorseshoeTimer.Enabled = True

End Sub


Sub HorseshoeTimer_Expired()
   HorseshoeTimer.Enabled = False
End Sub


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 3 posts ] 

Board index » Future Pinball » FAQ & Help


Who is online

Users browsing this forum: No registered users and 8 guests

 
 

 
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: