Flex Tilt

Support File FP Flex Tilt 2022-10-22

No permission to download
Future Pinball

shiva

Administrator
Staff member
Site Supporters
Joined
Oct 3, 2004
Messages
1,468
Solutions
2
Reaction score
1,068
Points
132
Favorite Pinball Machine
Trigon
shiva submitted a new resource:

Flex Tilt - Replacement system for stock FP tilt, plus analog tilt capable

A flexible tilt system for future pinball by shiva (blue)

This simulates a mechanical Plumb Bob type tilt system for Future Pinball, with custom code, as a alternative to the future pinball tilt system.
This was designed to REPLACE FP's tilt code, so any special coding calling FP's built in tilt system should be removed (such as Sub FuturePinball_TiltWarning(ByVal Warnings))
You do not need to define any keystrokes, this was developed using the standard template, so will work as is.

A ball...

Read more about this resource...
 
so any special coding calling FP's built in tilt system should be removed (such as Sub FuturePinball_TiltWarning(ByVal Warnings))

I integrated this a few days ago and did not knew about it so I just tried that and commented

TiltWarningRecovery_Expired
FuturePinball_TiltWarning
FuturePinball_Tilted

And without these the keyboard nudgers can't tilt

What did I miss?
 
Maybe I missed a step in my instructions. It's been 12 +years since I wrote this, but I left all the stock fp template tilt code in, so check that first.


(TiltRecoveryTimer)

Code:
Sub FuturePinball_Tilted()
    'AddDebugText "**Tilted**"

    ' play a sound
    PlaySound "Tilt"

    ' ensure that the flippers are down (as the keys won't work from now on)
    LeftFlipper.SolenoidOff
    RightFlipper.SolenoidOff

    ' you may wish to turn off any lights at this point. (The Light Sequencer
    ' will make this very easy)

    ' start the tilt recovery timer which waits until all balls have drained
    ' before doing the end of ball sequence (or end of game)
    TiltRecoveryTimer.Interval = 2000
    TiltRecoveryTimer.Enabled    = TRUE
End Sub

Sub TiltRecoveryTimer_Expired()
    ' disable the timer
    TiltRecoveryTimer.Enabled    = FALSE
    ' if all the balls have been drained then..
    If (BallsOnPlayfield = 0) Then
        ' do the normal end of ball thing (this dosn't give a bonus if the table is tilted)
        EndOfBall()
    Else
        ' else retry (checks again in another second)
        TiltRecoveryTimer.Interval = 1000
        TiltRecoveryTimer.Enabled = TRUE
    End If
End Sub
In Drain Hit this is needed. It needs to be the last line before the end sub
Code:
Sub Drain_Hit()
' *** ADD THIS TO YOUR CODE ***
' Here is the call to reset the routines. There is a bug in this template, no code for the script on what to do in case of a tilt, so I added it in my subroutine
    ResetTiltedState(TiltDifficulty) ' This resets the variable values for each new ball
End Sub

I'm away with the GF on a birthday mini vacation, but should be back Sunday evening. I will put this in fpxEngine, and see if there is a step missing in the instructions
 
@shiva

To avoid tilting while using manual ball roller, you may want to add the bold part to the script

Sub MyWall_Hit()
' first make sure you are actually playing a game
If (fpGameInPlay = TRUE) Then
If xBAM.ManualRoller = true then Exit Sub
 
what's could be good... It just to create a ball on a sphere model... by this way, the ball will always be on the at the bottom of the sphere, and have always the same behavior not matter the slope, and work same on X and Y axis....
 
and i forgot to mention, that with a sphere, by making a sphere model with a radius like a real tilt bob radius, we can have very good behaviour.
 
I don't know about the sphere model but you can create a custom ball with the radius you want.
A tilt bob however is more like a cone than sphere. I don't understand what you mean.

And as far as I'm aware any surface is conditioned to table slope implicitly.
 
I don't know about the sphere model but you can create a custom ball with the radius you want.
i don't talked about radius of ball. Only radius of bob sphere.

A tilt bob however is more like a cone than sphere. I don't understand what you mean.
A cone is a truncated sphere!
It appear like a cone for you because you think about tilt bob as pendelum that move only with his momentum and gravity...
But take it with you hand, move it full up at 180°.... 180°x180° give you a sphere.
And as far as I'm aware any surface is conditioned to table slope implicitly.
Yes i know. so it just need a "counter-sloped" surface as Target model ( wich have hit event ). 5 model for exemple: for 5°, 6°, 7°, 8°, 9°, 10°.
 
I don't know about the sphere model but you can create a custom ball with the radius you want
and you can... but it's only take account it for physics.. Not for visual.
 
@shiva

To avoid tilting while using manual ball roller, you may want to add the bold part to the script
will do, so you got it to work? Did i miss something in the instructions?

Why bother doing a model anyway guys, it works, and I'm sure there are more important things to do than that.
 
will do, so you got it to work? Did i miss something in the instructions?
Yes it is working. But to have both analog and digital nudge I need FP default Subs.
Why bother doing a model anyway guys, it works, and I'm sure there are more important things to do than that.
It is working indeed and very well.

fun fact: for some reason I can not make analog nudge work if I hide everything behind backbox. I put everything near the apron (still outside table) but nothing rendered and or using full transparent texture and I use BAM ball opacity property to hide it.

I do think I've made the surface bigger thought so now it covers the whole kicker and also "send to back" otherwise the ball was created on the ground :)

I did change the names and adapted FP tilt related subs to use it.

On this, I have a question. How do I destroy a ball by force?
 
Hmm, not sure. The kicker to create the ball is turned off, maybe turn it back on and create a second kicker if needed to destroy the ball right where the ball rests on the bottom wall?

Thanks for the addition info. I think I will rewrite the instructions. I would place this right under the apron myself, so it's hidden. No idea on the other stuff, but FP just hates me sometimes.
 
Sorry for the language barrier here but under the apron? I did though of that 1st but because there is just a wall except for drain and/or plunger kickers are I thought it could be a problem!

Let me know if it works. In any case outside the table but near the apron and right in the middle works well.
Screenshot 2022-10-25 185423.jpg
 
For Silent Hill and RF2, I used a hidden kicker (under the bottom left of the apron) that is only used to destroy balls (a kicker is the only way to destroy a ball as far as I know). I then use xBAM Set Position and Set Velocity as needed to relocate the ball to this kicker at anytime to destroy it as needed. This way I don't need to use hidden kickers anywhere on the playfield that may get in the way or over complicate things by needing cover surfaces when I don't want them to be used, etc.

1666721757437.png
 
Last edited:
Is there an example table for that except silent hill that I don't have yet?
 
Is there an example table for that except silent hill that I don't have yet?

I don't know if anyone else tried doing that. I used it for making balls disappear when going through certain things like the painting, or when transporting them, or when switching to a new level when the ball goes into the left orbit (under certain conditions, etc).

When it hit a trigger, then I would change it's position to the kicker hidden under the apron, and also change its velocity to ensure it wouldn't be moving when it "dropped" on the kicker.

1666730345996.png
 
...and I just noticed a goof in my code in that pic. :) (BallsOnPlayfield = BallsOnPlayfield = 0)
 
I was using drain coordinates but using kicker .x /.y is a much better idea
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: Free Bally! has left the room.
      Back
      Top