Dang, while reading the earlier replies I was thinking of suggesting just that, altho at the same time thinking "surely Bob and Terry would know about that old trick?"I am away for a few days but Rav suggested this:
Dim dX : dX = xBAM.Ball.Position.X - Bulb1Ext.X Dim dY : dY = xBAM.Ball.Position.Y - Bulb1Ext.Y Dim distToIndy : distToIndy = sqr(dX*dX + dY*dY) If distToIndy < 30 Then AddDebugText "Rock Wins!" : PlaySound "Yeah Ha"
It should work perfectly ?
Back when I did my Billiards game in VP, there didn't seem to be a way to detect certain kinds of hits via script, so I had to use some math like the above to tell when balls collided, simply so I could play an appropriate sound. I recall ripping the idea from a cool table called "Quidditch Madness," which had some crazy physics and very non-typical pinball objectives.
Hmm... probably should get that uploaded here.