Jump to content



Photo
- - - - -

Script for different color ball in each case.

each case color of ball create ball Sub kicker

  • Please log in to reply
3 replies to this topic

#1 1000

1000

    Advanced Coder

  • Platinum Supporter
  • 62 posts
  • Location:Florida

  • Flag: United States of America

  • Favorite Pinball: Pirates Wolves of the Seas,Wipeout,Spiderman,White Water and Avengers.

Posted 26 November 2023 - 01:17 AM

I was trying to make a script with a different color ball in each case

To do this you need an object that is already in the table as sounds which I use a sound to work off of,at the bottom are the ex.

Thanks again for reading.

 


Edited by 1000, 27 November 2023 - 10:21 AM.


#2 Popotte

Popotte

    Pinball Fan

  • VIP
  • 812 posts
  • Location:Paris

  • Flag: France

  • Favorite Pinball: World Fair



Posted 26 November 2023 - 05:24 PM

If you use CurrentPlayer in an other place (for scoring, ...), it's normal to have an error (assuming you have 4 players or less).

Just use an otjer variable.


Les cons ça ose tout. C'est même à ça qu'on les reconnaît.

PopotteDMDredo.gif

 


#3 1000

1000

    Advanced Coder

  • Platinum Supporter
  • 62 posts
  • Location:Florida

  • Flag: United States of America

  • Favorite Pinball: Pirates Wolves of the Seas,Wipeout,Spiderman,White Water and Avengers.

Posted 27 November 2023 - 01:02 AM

Thank you Popotte,

I figured it out I have to identify an object,

Here is an ex.

In this case i'm using rscoop as a Sub instead of a kicker Sub it's the same thing I already have written out in a script. "It works great"

======================================                                                                      =====================

Look where it says      PlaySound"bell":trains()     That's the command to start the Sub Trains    You also have to Dim Train

======================================                                                                      =====================
Sub Rscoop_hit
     Addscore(500)
     PlaySound"bell":trains()
    light42.State = BulbBlink
    light42.BlinkPattern = "10"
    light42.BlinkInterval = 450
    Bulb58.State = BulbBlink
    Bulb58.BlinkPattern = "10"
    Bulb58.BlinkInterval = 225
    Rscoop.DestroyBall()
    Timer30.Enabled = True
    Timer31.Enabled=True
    Timer31.Interval = 101
    Kicker16.CreateBall (fpEventID) 'chrome blue
     Kicker16.SolenoidOn()
    LightSeq1.play seqrightoff,50,3
End sub
 

Sub trains()
select case train
    case 1:Kicker16.CreateBall 208,137,4 'orange
    case 2:Kicker16.CreateBall 236,4,31 'red
    case 3:Kicker16.CreateBall 253,244,91  'yellow
     case 4:Kicker16.CreateBall 64,0,128 'dark blue
    case 5:Kicker16.CreateBall 251,145,153  'pink
    case 6:Kicker16.CreateBall 167,7,143 'purple
    case 7:Kicker16.CreateBall 27,114,37 'green
end select
    train=train+1
end sub

 

Thanks everyone for replying to this topic and reading enjoy the info.

Have a great day.

Cheers.

 

I edited this I'll be back with a cleaner script for kickers later.

trains is actually a sound that was already identified

so I'm using that case entry to use a kicker to create a different color ball

Here it is with lights every time you hit the rscoop:

on the 8th time you get an extra ball the light lights up and also the narrator says you got an extraball

then after 12 times 4 more lights light up and the narrator says something outstanding.

Sub trains()
select case train
    case 1:ball1.state=1:Kicker16.CreateBall 208,137,4 'orange
    case 2:ball2.state=1:Kicker16.CreateBall 236,4,31 'red
    case 3:ball3.state=1:Kicker16.CreateBall 253,244,91  'yellow
     case 4:ball4.state=1:Kicker16.CreateBall 64,0,128 'dark blue
    case 5:ball5.state=1:Kicker16.CreateBall 251,145,153  'pink
    case 6:ball6.state=1:Kicker16.CreateBall 167,7,143 'purple
    case 7:ball7.state=1:Kicker16.CreateBall 27,114,37 'green
     case 8:stars.state=1:extraballsawards(currentplayer)=1:ShootAgainLight.State = BulbOn:Playmusic 8,"narrator_xtraball":Kicker16.CreateBall 208,137,4 'orange
    case 9:Light7.State = BulbOn:Kicker16.CreateBall 236,4,31 'red
    case 10:Light8.State = BulbOn:Kicker16.CreateBall 253,244,91  'yellow
    case 11:Light9.State = BulbOn:Kicker16.CreateBall 64,0,128 'dark blue
    case 12:Bulb57.State = BulbOn:Playmusic 6,"narrator_niceshoot6":Kicker16.CreateBall (fpEventID)
end select
    train=train+1
end sub

 

Oh yes just so you know "ball1,ball2,ball3,ball4,ball5,ball6,ball7 and ball8 are actually a light on the table signifying a balloon a clown is holding.

There not balls just in case your reading trying to figure things out. "cheers"

 

This lights up the lights on the table like it should and creates the ball but after 12 times it stops so I'm working on that now.

Be back soon.

To correct this I have to make 100 cases or whatever I would like to keep the player playing.

Cheers.


Edited by 1000, 27 November 2023 - 10:38 AM.


#4 1000

1000

    Advanced Coder

  • Platinum Supporter
  • 62 posts
  • Location:Florida

  • Flag: United States of America

  • Favorite Pinball: Pirates Wolves of the Seas,Wipeout,Spiderman,White Water and Avengers.

Posted 27 November 2023 - 02:43 AM

O.K. I got it figured out it was pretty easy write it like this:

I made up a word called it trucks and subbed it out......"through a sound."

Then when you want a kicker to access this sub you use this command   PlaySound"bell":trucks()  

Sub trucks()
select case truck
    case 1:Kicker15.CreateBall 208,137,4 'orange
    case 2:Kicker15.CreateBall 236,4,31 'red
    case 3:Kicker15.CreateBall 253,244,91  'yellow
     case 4:Kicker15.CreateBall 64,0,128 'dark blue
    case 5:Kicker15.CreateBall 251,145,153  'pink
    case 6:Kicker15.CreateBall 167,7,143 'purple
    case 7:Kicker15.CreateBall 27,114,37 'green
     case 8:Kicker15.CreateBall 208,137,4
    case 9:Kicker15.CreateBall 236,4,31 'red
    case 10:Kicker15.CreateBall 253,244,91  'yellow
    case 11:Kicker15.CreateBall 64,0,128 'dark blue
    case 12:Kicker15.CreateBall (fpEventID) 'chrome blue
end select
    truck=truck+1
end sub

 

Sub Kicker13_hit()
    Kicker13.DestroyBall()
    Timer27.Enabled = True
    PlaySound"bell":trucks()           "This is actually the command that changes the ball color to access the trucks Sub."
     Kicker15.CreateBall 64,0,128 'dark blue
     Kicker15.SolenoidOn()
    Timer29.Enabled = True
End sub

You have to keep Kicker15.CreateBall 64,0,128 'dark blue   or any color to keep playing after the cases ended.

I actually wrote the code for 8 cases on each kicker and with all the balls flying around I really never noticed as some of the kickers were still doing there cases.

After each ball the table resets and goes back to the first case.

It seems to work great.

Circus Starr "Ring Master" Pro Edition v1.1

Soon to be released....

Have a Super Great Day Everyone

Thanks for reading

Cheers.


Edited by 1000, 28 November 2023 - 10:28 AM.