GoPinball.com
http://www.gopinball.com/forum/

Simple DMD Highscore Illustrated
http://www.gopinball.com/forum/viewtopic.php?f=55&t=5186
Page 1 of 2

Author:  Gimli [ Sat Nov 29, 2014 11:55 am ]
Post subject:  Simple DMD Highscore Illustrated

I hope you are not getting Tutorialled to death, but I thought I'd offer just one more and then crawl back under my rock.

Simple HighScore DMD's for all comers.

Heres a youtube video demonstrating this tutorial:
https://youtu.be/yMDt7ktYYlk


This procedure should work in existing table DMD's or in newly created DMD's in conjuntion with my previous tutorials (Simple DMD's, Simple FutureDMD's, Simple Animated FutureDMD's). To accomplish this you will need to check for the name of the DMD where you wish the DMD Highscore to be displayed. For use with the Animated FutureDMD's an apostrophe needs to be removed from 5 places to ShutbackgroundsOff() while highscore is being displayed. This will be described at the end of the tutorial.

This should be straight forward as we're merely copy 'n pasting Francisco666's routine from Apollo13. I changed a few names to English and that's it.
I used this procedure for the recent ZED 1.1 Gilligan's Island release and it seems to work well. So good luck and remember to credit Francisco666 if you use this in a submitted table. These are highly confidential trade secrets, so be quiet about it :)

Procedure :
1.Table Prep Import 2 Fonts and Create 2 Timers
2. Disable Hud HighScore
3. Enable DMD HighScore (Copy 'N Paste)
4.Set Left and Right Flippers for changing between letters (Copy 'N Paste)
5.Set Plunger for Selecting Letter (Copy 'N Paste)
6.Scripting to make it all work (Copy 'N Paste)

1. Table Prep
A. Import 2 Fonts from Apollo13 (or from other tables if you want different look)

Author:  Gimli [ Sat Nov 29, 2014 11:56 am ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

Select fonts
jm_9.dmdf
dmd06x07p.dmdf (most tables already have this by default)

Here's a link for these fonts:
https://www.dropbox.com/sh/ruz65jz5hmav ... Oigoa?dl=0

Author:  Gimli [ Sat Nov 29, 2014 11:57 am ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

Click ok

Author:  Gimli [ Sat Nov 29, 2014 11:57 am ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

B. Create 2 Timers
Go to Translite under Table Editor and create these 2 timers:

TIMEDmoveletters
afterhseob

Author:  Gimli [ Sat Nov 29, 2014 11:58 am ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

go to next page

Author:  Gimli [ Sat Nov 29, 2014 11:58 am ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

C. Check the DMD name to enter in script below (described at the end)

Author:  Gimli [ Sat Nov 29, 2014 11:59 am ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

2.Disable Hud HighScore

Under "Sub EndOfBallTimer_Expired()" Just put an apostrophe ' in front of two statements to inactivate them as follows:

'bEnteringAHighScore = TRUE
'EnterHighScore(CurrentPlayer)

Author:  Gimli [ Sat Nov 29, 2014 12:00 pm ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

3.Enable DMD Highscore

Just below the last statements you just changed under If (BallsRemaining(CurrentPlayer) <= 0) Then

Copy 'N Paste :
Code:
If nvScore(CurrentPlayer)<nvHighScore(10)then
               EndOfBallComplete()
                  exit sub
               End if
               if nvScore(CurrentPlayer)>nvHighScore(10)then
                  'ShutBackgroundsOff()
                  SelectLetter=1
                  letter1=64
                  letter2=32
                  letter3=32
                  letter4=32
                  benterhighscoremode=true
                  highscoremoveright=true
                  TIMEDmoveletters.set true,500
                  moveletterhs
                  exit sub
  End if

Author:  Gimli [ Sat Nov 29, 2014 12:01 pm ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

4. Set Left and Right Flippers for changing between letters

under "If (KeyCode = GetKeyCode(LeftFlipperKey)) Then"
Copy 'N Paste:

Code:
if benterhighscoremode=true then
               'ShutBackgroundsOff()
               PlaySound "Flipper"
               highscoremoveright=false
               moveletterhs
               exit sub
            end if



and under "If (KeyCode = GetKeyCode(RightFlipperKey)) Then"
Copy 'N Paste:
Code:
 if benterhighscoremode=true then
            'ShutBackgroundsOff()
            PlaySound "Flipper"
            highscoremoveright=true
            moveletterhs
               exit sub
            end if

Author:  Gimli [ Sat Nov 29, 2014 12:02 pm ]
Post subject:  Re: Simple DMD Highscore Illustrated for all comers

Set Plunger for Selecting Letter (Copy 'N Paste)

under "If (KeyCode = GetKeyCode(PlungerKey)) Then"
Copy 'N Paste:

Code:
if benterhighscoremode=true then
         'ShutBackgroundsOff()
         PlaySound "plungerrelease"
         if ChangeLetter=63 then'End the entername
               endselection
               exit sub
            end if
            if ChangeLetter=62 then'Backspace
               if SelectLetter=1 then
                  exit sub
               end if
                     if SelectLetter=2 then
                        letter2=64
                     end if
                     if SelectLetter=3 then
                        letter3=64
                     end if
                  SelectLetter=SelectLetter-1
                  highscoremoveright=true
                  moveletterhs
                  highscoremoveright=false
                  moveletterhs   
               exit sub   
            end if
               SelectLetter=SelectLetter+1
                  if SelectLetter=>4 then
                     SelectLetter=4
                     ChangeLetter=63
                  end if
               highscoremoveright=true
               moveletterhs
               highscoremoveright=false
               moveletterhs
            exit sub
         end if

Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/