Author |
Message |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sat Dec 14, 2019 1:25 pm |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
here is the new version with hit sound for guides and surface. for each guide/surface you have to check "generate hit event"
and add a code like this (for guide9 ):
Sub Guide9_Hit() metalGuideHitBBOXHeight Guide9,65,230,167,291,0.0 End Sub
where 65,230 (X,Y) and 167,291 (X,Y) define the boundary box enclosing the guide (use the editor coordinate) and 0.0 is the Z level (0.0 for playfield)
you can be very detailled by setting boundaryboxe for each component or use a global boudarybox shared for all of them.
but there is a catch, if you use a global boundarybox for all component, a single ball play will be correctly handled but multiball may play the incorrect panning....
in the demo the upper part has dedicaced boudary box shown when hit the lower part use the same global boudary box shown when hit
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sat Dec 14, 2019 1:29 pm |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
hmmmm tell me if you seen the zip file to download. because i have some difficulties to upload it..... i'm retrying to upload.....
[edit] Sorry, the board attachment quota has been reached. erff......
[edit] finally managed to upload by removing old versions check first page
|
|
 |
|
 |
wild
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sat Dec 14, 2019 6:24 pm |
|
Joined: Sat Jan 29, 2011 4:54 pm Posts: 1434 Location: Italy
|
Smoke, I don't see the link, I don't know the others.
ok..for the guide like this...(even if I don't understand the values for now) Sub Guide9_Hit() metalGuideHitBBOXHeight Guide9,65,230,167,291,0.0 End Sub
but for the surface?..levell (top height 53) name of the surgace... (TimePlay)....
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sun Dec 15, 2019 9:07 am |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
hello the link is in the first page
the sample given is for a guide (wall) named Guide9 in the editor. Suppose you have made a guide (wall not wireguide) named myWallGuide so you have to check the "generate hit event" and code the following :
Sub myWallGuide_Hit() metalGuideHitBBOXHeight myWallGuide,x1,y1,x2,y2,baseZ End Sub where : x1,y1 is the topleft coordinate of the boundary box x2,y2 is the bottomright coordinate of the boundary box baseZ the height level where the guide is (if on playfield then 0.0)
you can also use a surface that act like a wall (the bal will not roll on it but will hit it like the surface used to drain the ball).
baseZ=the height where the guilde/wall is put on. so for guide/wall that are on the playfield it is 0.0
but if you have a guide/wall that is put on upper playfield you have to enter the height of the upper playfield. look at the exemple you will see what I have done to the 2 surface that stop the ball when the ball fall from the end of the ramps
Last edited by smoke on Sun Dec 15, 2019 9:13 am, edited 3 times in total.
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sun Dec 15, 2019 9:08 am |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
so for you table if your playfield is at 53.0 all elements on it will be at height 53.0 so use baseZ=53.0
also you don't have to be very precise on the boundary box coordinates. I handle some margins to avoid to make the coordinate task too painfull todo.
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sun Dec 15, 2019 10:23 am |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
for information: I know you can directly associate a sound when a guide is hit. The problem is when the guide is long enough that you can't decide if you have to play right , left or center hit sound (because you don't have the info on where on the guide the ball hit). For ex this is the case for the main metal guide used when you launch the ball or when you are performing left/right orbit.
That's why a added the ability to handle hitsound with panning. but if you have some case where the sound to play is 100% obvious you don't realy need it.
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Wed Dec 18, 2019 6:09 pm |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
little bug corrected, check first page for new version
|
|
 |
|
 |
wild
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sat Dec 28, 2019 7:05 am |
|
Joined: Sat Jan 29, 2011 4:54 pm Posts: 1434 Location: Italy
|
smoke wrote: little bug corrected, check first page for new version thanks again...ok I have 2 questions for you 1)every kicker on the table must be placed this---->addTrackedBall(xxxxxxKicker)....or only in drain and PlungerKicker? 2)ok, for createball or createcaptiveball---->addTrackedBall(xxxxxxKicker)... for xxxx.DestroyBall---->deleteTrackedBall(xxxx)..... but if I this type of kicker? sub Kickerxxxx_hit() Kickerxxxx.SolenoidOff Timer1.Interval = 1000 Timer1.Enabled = TRUE end sub sub Timer1_Expired() Timer1.Enabled = FALSE Kickerxxxx.SolenoidOn Kickerxxxx.SolenoidPulse end sub
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sun Dec 29, 2019 5:33 pm |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
as written in the documentation:
--add after all ball creation (not locked ball) a call to addTrackedBall/addTrackedBallHeight
-- before destroying the ball add a call to deleteTrackedBall/deleteTrackedBallHeight
|
|
 |
|
 |
smoke
|
Post subject: Re: ball rolling sound with BAM ball tracking Posted: Sun Dec 29, 2019 5:34 pm |
|
Joined: Fri Jun 28, 2013 4:46 pm Posts: 361
|
in your case the Kickerxxxx is not creating any new ball or destroying any existing ball. So you don't have to do anything
|
|
 |
|
 |
|