Jump to content



Photo
- - - - -

1/2 COIN FIRST TIME


  • Please log in to reply
7 replies to this topic

#1 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 16 April 2015 - 11:18 PM

1/2 how do I set to work one to one credit for the game
GREETINGS :pinnochio:


#2 decepticiondirge

decepticiondirge

    Neophyte

  • Members
  • Pip
  • 9 posts

  • Flag: United States of America

  • Favorite Pinball: Checkpoint

Posted 23 April 2015 - 12:43 AM

If you saw my fast credit post, use that and change if (fastcredit = 3) to if (fastcredit = 2)



#3 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 03 May 2015 - 11:33 PM

no options fastcredit >?



#4 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 06 May 2015 - 02:58 PM

Please give me just one answer
how to make 2 coins 1 credits  all time
1/2
greetings



#5 SpectreRose

SpectreRose

    Hobbyist

  • Members
  • PipPip
  • 28 posts

  • Flag: ---------

  • Favorite Pinball: I love too many I can't decide!

Posted 06 May 2015 - 06:36 PM

Well, I think most of the programming is already there for what you want and that you'd just need to change a couple of values.

 

The first thing to do would be to create a line near the top of your programming: Dim Coins

You'd need something like that for later. Put it in among all the other Dims at the beginning of your code. Since this is one you'd be adding, I think the best place for it would be at the bottom of that list.

 

Next, there's a line that goes Sub FuturePinball_KeyPressed(ByVal KeyCode). That would be the Subroutine I'd look into now. There's a line in that Subroutine that goes If (KeyCode = GetKeyCode(InsertCoinKey)) Then. You'll notice the first line beneath that is PlaySound = "CoinIn", followed by nvCredits = nvCredits + 1. This is where you'll want to make some changes. I think I would do something like this:

    If (KeyCode = GetKeyCode(InsertCoinKey)) Then
        PlaySound "CoinIn"
        Coins = Coins + 1

        If (Coins => 2) Then
            nvCredits = nvCredits + 1
            If (fpTilted = FALSE) Then
                LeftSlingshotBulb1.FlashForMs  200, 100, BulbOff
                LeftSlingshotBulb2.FlashForMs  200, 100, BulbOff
                RightSlingshotBulb1.FlashForMs 200, 100, BulbOff
                RightSlingshotBulb2.FlashForMs 200, 100, BulbOff
            End If
        End If
    End If

Give it a shot.



#6 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 06 May 2015 - 09:30 PM

uh I thought it would go easier
  Error line192,
Perhaps I'm not quite clear about the dim coins so if you can be an example
Thank you for your understanding and rapid response


#7 SpectreRose

SpectreRose

    Hobbyist

  • Members
  • PipPip
  • 28 posts

  • Flag: ---------

  • Favorite Pinball: I love too many I can't decide!

Posted 06 May 2015 - 10:36 PM

Okay, so I just took the example I made here and posted it to my Space Invaders table for Future Pinball. Works fine there.

 

That said... I'm not sure what Line 192 is on your code. Knowing this could help, though given your lack of clarity regarding the Dim Coins, this may be part of the issue. 

 

Okay, I'll try breaking it down. "Coins" is a variable. In this case we need it to be a numeric variable, ie 1, 2, 3, 4, etc... No problem. The program needs to know that "Coins" is a numeric value to work with, so you are declaring it near the beginning of your code along with all the other variables up there, such as "Dim bFreePlay", "Dim BallsOnPlayfield" and so on.

 

If you did not add a line in that list that says "Dim Coins", then the program does not know what "Coins" is and just gives you an error as it fails to understand what "Coins" even are. By adding "Dim Coins", the program understands that it is something important, something that has value to it somehow.

 

The line, "Coins = Coins + 1" tells it that whenever the button is pressed (5 by default) it means that Coins is a numeric value that goes up by 1 every time that button is pressed.

 

The next lines, "If (Coins => 2) Then  ... nvCredits = nvCredits + 1 ... "  means that whenever you have 2 or more "Coins" then it equals 1 Credit, which gets added to the number of credits that Future Pinball will remember.

 

It's not a perfect code. Granted, even I think it could use a little polish, but this is probably the simplest way to code that kind of thing. Just remember to add an extra "End If" for that extra IF line you added, otherwise it might confuse the program as it would be expecting an "End If" at the end of the subroutine, perhaps jumble a few things in the process.

 

That help any?



#8 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 08 May 2015 - 01:01 PM

very well explained al somewhere is making a mistake
I thought it would be easier
If (MoneyIn = 0) and (nvCredits = 0) Then 'When the game first starts, you must insert 2 coins for the first credit
MoneyIn = MoneyIn + 1
I thought there would simply be a change
Thank you for your answer