BAM BAM Set Velocity Demystified ?

wild

No Bam no Play
Chat Moderator
Therefore, according to my understanding at the level of intelligence, but not at the mathematical or physical level, I understand (in theory) that: using the concept of right angles (your illumination), and applying it to the magical code, you have total control of: ball, cue and cue ball?......practically like a real billiards?
2. Plunger and flipper and kicker boosts where the ball is already in motion, we simply stay with the left side of the equations
BAM already monitors these values so we can just plug them in ....
ball.SetVelocity Velocity.x, Velocity.y, 0
So if you want to boost the ball by a factor of two, it is very simple:
ball.SetVelocity 2*Velocity.x, 2*Velocity.y, 0

This is the part that I try to understand better, it seems to hit something with my kicker demo which I added the "boost" ..... right?
but that for some reason didn't work
 
Last edited:

Gimli

Pinball Hall of Famer
Therefore, according to my understanding at the level of intelligence, but not at the mathematical or physical level, I understand (in theory) that: using the concept of right angles (your illumination), and applying it to the magical code, you have total control of: ball, cue and cue ball?......practically like a real billiards?

This is the part that I try to understand better, it seems to hit something with my kicker demo which I added the "boost" ..... right?
but that for some reason didn't work
Ok I will have a look but I should mention in advance that special code may be required during multi ball so that the new code doesn’t get applied to every ball on the table 😜
 

wild

No Bam no Play
Chat Moderator
Ok I will have a look but I should mention in advance that special code may be required during multi ball so that the new code doesn’t get applied to every ball on the table
but on billiards, it's not a multiball, of course how do I mean it? or yes?I, due to the black textures, have never been able to try it as I should.....the your billiards
 

AnonTet

Pinball Wizard
Site Supporters
If you don't want to keep remembering when to use the minus sign just enclosure the whole equation in abs(_equation_here_) - not sure if it is more efficient thought.

I'm just saying because it's the same with the right flipper as the movement is also inverted. Surely there's more stuff but the point is, if unsure or when using something that requires up/down or left/right usage and this is at least a safe way to avoid problems.
 

TerryRed

Pinball Master
So.... I've been in the process of removing all RetroFlair 2 content from Silent Hill over the last few days. Surprisingly, deleting every texture (one at a time in FP) from the many animations didn't take that long.

For the portals on Silent Hill, I decided to take the time to use this new position / velocity feature of BAM, to replace my previous hidden kicker / cover / magnet (all over the playfield) method.

The new feature was very easy to add in and make it work!

Now I can create a portal / opening / gate dynamically anywhere if I wanted.... and then redirect the ball to a hidden kicker (under the apron, etc) if I need to destroy it.

It's nice that smoke's ball rolling and pup SSF ball rolling methods both work when the ball gets redirected.



Nothing fancy... just 2 commands like this to shoot the ball out of a portal:

xBAM.Ball.SetPosition 425, 562, 60
xBAM.Ball.SetVelocity -700, 700, 0


...and using a trigger in the orbit to redirect the ball to the hidden kicker in the apron when I need to destroy it.

xBAM.Ball.SetPosition Orbit_Left_Kicker.x, Orbit_Left_Kicker.y, 0
xBAM.Ball.SetVelocity 0, 0, 0

....and I didn't even need to know SO CA TO AH :)


The portals looks the same as what you saw in the prior preview video.

 
Last edited:

Gimli

Pinball Hall of Famer
So.... I've been in the process of removing all RetroFlair 2 content from Silent Hill over the last few days. Surprisingly, deleting every texture (one at a time in FP) from the many animations didn't take that long.

For the portals on Silent Hill, I decided to take the time to use this new position / velocity feature of BAM, to replace my previous hidden kicker / cover / magnet (all over the playfield) method.

The new feature was very easy to add in and make it work!

Now I can create a portal / opening / gate dynamically anywhere if I wanted.... and then redirect the ball to a hidden kicker (under the apron, etc) if I need to destroy it.

It's nice that smoke's ball rolling and pup SSF ball rolling methods both work when the ball gets redirected.



Nothing fancy... just 2 commands like this to shoot the ball out of a portal:

xBAM.Ball.SetPosition 425, 562, 60
xBAM.Ball.SetVelocity -700, 700, 0
Ya this code is so cool !
I am guessing this moves ball 45 degrees (225 degrees of "trajectory" according to my Trajectory Circle above) toward the bottom left corner

In code below "number" , you can choose any number you wish but it must be the SAME number used throughout the code.
Changing the number of course will change the overall velocity...
So for simple velocity in 45 degree increments we can have:

1. Top Left
xBAM.Ball.SetVelocity -number, -number, 0

2. Top Right
xBAM.Ball.SetVelocity number, -number, 0

3.Bottom right
xBAM.Ball.SetVelocity number, number, 0

4.Bottom Left
xBAM.Ball.SetVelocity -number, number, 0

And for simple velocitiy at 90 degrees increments:

1.Straight up table
xBAM.Ball.SetVelocity 0, -number, 0

2. To the Right 90 degrees
xBAM.Ball.SetVelocity number, 0, 0

3.Straight down table toward you
xBAM.Ball.SetVelocity 0, number, 0

4.To the Left 90 degrees
xBAM.Ball.SetVelocity -number, 0, 0



...and using a trigger in the orbit to redirect the ball to the hidden kicker in the apron when I need to destroy it.

xBAM.Ball.SetPosition Orbit_Left_Kicker.x, Orbit_Left_Kicker.y, 0
xBAM.Ball.SetVelocity 0, 0, 0
xBAM.Ball.SetVelocity 0, 0, 0
this should stop the ball ?

....and I didn't even need to know SO CA TO AH :)
True but now that we do, we are totally complete human beings :trippy:
The portals looks the same as what you saw in the prior preview video.

Very Cool Stuff Terry !
 
Last edited:

TerryRed

Pinball Master
@Gimli

xBAM.Ball.SetVelocity 0, 0, 0
this should stop the ball ?


Yes, this is used when I relocate the ball when it travels up the covered left orbit (for specific events only), and then plop it onto a hidden kicker elsewhere. Stops the ball and drops it in position.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ 20degree:
    *** *** **** **** ********* *** *** * ****** *** *** ************ ** *** ***** *** **** ** ******* ** *** ***** ****** ******** **** **** ************ **** **** ******
    Quote
  • @ xenonph:
    * * ****** *** ***** **** * *** *** **** **** ******* *** *** *** *** **** ** *****
    Quote
    @ xenonph: * * ****** *** ***** **** * *** *** **** **** ******* *** *** *** *** **** ** *****
    Top