Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » FAQ & Help




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Script Help needed, Match number display
 Post Posted: Sun Jul 01, 2018 5:27 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 22
Location: Australia
How do I get a DMD to display 00 instead of 0 when the Match feature is displayed? I have had to resort to a display segment for the moment

This is my current Match generation script

Code:
If ((BallsRemaining(CurrentPlayer) <= 0) And (BallsRemaining(NextPlayer) <= 0)) Then
      ' you may wish to do some sort of Point Match free game award here
      ' generally only done when not in free play mode
      MatchNumber = 10 *(Int(Rnd *10))                                             ' Generate the match play number
      MatchPlay = 0                                                               ' There are no match plays yet
      
      For x = 1 To PlayersPlayingGame
         If MatchNumber = nvScore(x) Mod 100 Then ScoreMATCH() 'MatchPlay = MatchPlay + 1      ' Look to all players whether there is a match with MatchNumber
      Next
         DispDmd2.QueueText "[edge3][xC][yC][f8]MATCH: "& MatchNumber, deWipeRight, 3000, TRUE
         HUDDmd2.QueueText "[edge3][xC][yC][f8]MATCH: "& MatchNumber, deWipeRight, 3000, TRUE
      If MatchNumber = 0 Then
         DispSegMatch.Text = "00"                                             ' If MatchNumber is "0" then show in Match Display "00" ...
      Else
         DispSegMatch.SetValue(MatchNumber)                                 ' ... or show any other Number
      End If


Top 
 Profile  
 
 Post subject: Re: Script Help needed, Match number display
 Post Posted: Mon Jul 02, 2018 2:20 am 
Offline
User avatar

Joined: Mon Sep 21, 2015 10:33 am
Posts: 112
Location: UK - Bridgnorth (Shropshire)
***** PLEASE NOTE: I Do Not Code... however *****

Where the MatchNumber equals 0, could you not just include an additional "0" in front of the code to display the MatchNumber i.e.:

DispDmd2.QueueText "[edge3][xC][yC][f8]MATCH: "& "0" & MatchNumber, deWipeRight, 3000, TRUE

Otherwise continue and show the MatchNumber that is 10 or above.

Something like this...?

Code:
      For x = 1 To PlayersPlayingGame
         If MatchNumber = nvScore(x) Mod 100 Then ScoreMATCH() 'MatchPlay = MatchPlay + 1      ' Look to all players whether there is a match with MatchNumber
      Next

      If Matchnumber = 0 Then
         DispDmd2.QueueText "[edge3][xC][yC][f8]MATCH: " & "0" & MatchNumber, deWipeRight, 3000, TRUE
         HUDDmd2.QueueText "[edge3][xC][yC][f8]MATCH: " & "0" & MatchNumber, deWipeRight, 3000, TRUE
      Else
         DispDmd2.QueueText "[edge3][xC][yC][f8]MATCH: " & MatchNumber, deWipeRight, 3000, TRUE
         HUDDmd2.QueueText "[edge3][xC][yC][f8]MATCH: " & MatchNumber, deWipeRight, 3000, TRUE
     End If


I'm sure the others on the site here will correct the code (Gimli/George/Wild/Franzleo/Blue...?), but as this is something similar to what I have done when including a leading '0' for number of credits / balls remaining, I thought I would share this method with you; which I know is very similar to what you already have in your code.


Top 
 Profile  
 
 Post subject: Re: Script Help needed, Match number display
 Post Posted: Mon Jul 02, 2018 12:46 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1603
Location: Arkansas, USA
I know very little about coding but it makes sense to me.

George


Top 
 Profile  
 
 Post subject: Re: Script Help needed, Match number display
 Post Posted: Mon Jul 02, 2018 1:11 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 318
Location: Abbotsford
err, is this DMD or Solid State?

In the FPX template, which is a Solid State template. MP is the value. it generates a "0" so you just change the display text in that occasion to just display "00" instead. popette has been doing that for years, pretty simple fix
Code:
MP = 10 *(Int(Rnd *10))                                                                                    ' math to generate a random match number
            DispMP.SetValue(MP):HudMP.SetValue(MP)
            IF MP = 0 THEN DispMP.Text = "00":HudMP.Text = "00"    

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: FPx Template Engine


Top 
 Profile  
 
 Post subject: Re: Script Help needed, Match number display
 Post Posted: Mon Jul 02, 2018 7:44 pm 
Offline
User avatar

Joined: Thu Jan 26, 2017 6:48 pm
Posts: 22
Location: Australia
DMD, I have resorted to using a solid state 2 digit display for the moment until I can work out the problem, but I dont want the SS display on the final product

https://imgur.com/a/eir6BKv


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

Board index » Future Pinball » FAQ & Help


Who is online

Users browsing this forum: No registered users and 7 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: