Code/Example Adding auto camera panning of tables.

Coding and examples for future Pinball and BAM

HZR

Pinball Hall of Famer
Site Supporters
Joined
Aug 17, 2021
Messages
555
Solutions
1
Reaction score
175
Points
56
Favorite Pinball Machine
elm street
Can someone help me add camera Panning to my tables.
Meaning when a table loads the camera will go around the machine and table, I would like to add this for my cabinet. Any help appreciated. I tried adding this script but it didnt work. Figured I may ask before I spend hours on something that may be simple
example

''''''''''''''''''''''''''''''''''''''''''Camera Settings'''''''''''''''''''''''''''''''''''''''''''''''''

If xBAM.Camera.Mode = xBAM_Camera_Desktop then DesktopMode = True
If xBAM.Camera.Mode = xBAM_Camera_Cabinet Then DesktopMode = False


'Desktop Camera sequence for Panning
xBAM.Camera.DesktopSequenceBegin 10
xBAM.Camera.DesktopSequenceAddEntry -725, 1869, 928.6, 690.1, -22.6, 110.6, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 1275, 1869, 916.7, 220.3, -114.6, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 344.8, 1869, 1068.6, 297.9, -371.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 372.8, 1800.8, 948.8, 352.8, -102.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 192.6, 558.3, 0, 50, 8000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 10000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 3000
xBAM.Camera.DesktopSequenceAddEntry 275, 1421.5, 450, 275, 434, 0, 50, 3000
xBAM.Camera.DesktopSequenceEnd

'Cabinet Camera sequence for Panning
xBAM.Camera.CabinetSequenceBegin 11
xBAM.Camera.CabinetSequenceAddEntry 0, 0, 0, 1, 1, 1, 0, 0, 0, 5000
xBAM.Camera.CabinetSequenceAddEntry 0, 1200, -500, 2, 2, 1.1, 20, -0, 0, 10000
xBAM.Camera.CabinetSequenceAddEntry -1700, 800, -600, 2, 2, 1.1, 20, 0, -70, 10000
xBAM.Camera.CabinetSequenceAddEntry 1700, 800, -600, 2, 2, 1.1, 20, -0, 70, 10000
xBAM.Camera.CabinetSequenceEnd


Sub CheckCamera()
If xBAM.Camera.Mode = xBAM_Camera_Desktop and RoomCamera = 1 Then
DesktopMode = True
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If
If xBAM.Camera.Mode = xBAM_Camera_Desktop and RoomCamera = 2 Then
DesktopMode = True
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If
If xBAM.Camera.Mode = xBAM_Camera_Desktop and RoomCamera = 3 Then
DesktopMode = True
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If

If xBAM.Camera.Mode = xBAM_Camera_Desktop then
DesktopMode = True

If RoomCamera = 0 then nvR2 = 0:xBAM.Camera.DesktopRelease
If RoomCamera = 1 then nvR2 = 1:xBAM.Camera.DesktopSequencePlay 10
If RoomCamera = 2 then nvR2 = 2:xBAM.Camera.DesktopSequencePlay 10
If RoomCamera = 3 then nvR2 = 3:xBAM.Camera.DesktopRelease
End if

If xBAM.Camera.Mode = xBAM_Camera_Cabinet and RoomCamera = 1 Then
DesktopMode = False
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If
If xBAM.Camera.Mode = xBAM_Camera_Cabinet and RoomCamera = 2 Then
DesktopMode = False
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If

If xBAM.Camera.Mode = xBAM_Camera_Cabinet then
DesktopMode = False
If RoomCamera = 0 then nvR2 = 0:xBAM.Camera.CabinetRelease
If RoomCamera = 1 then nvR2 = 1:xBAM.Camera.CabinetSequencePlay 11
End if
End Sub

''''''''''''''''''''''''''''''''''''''''''''''End if Camera Settings''''''''''''''''''''''''''''''''''
 
Just to make sure it is clear:


You won't be asked to DENY/ALLOW the camera control if you use:
You wont be asked to DENY/ALLOW if you delete the 3 lines of code.
(I edited my post)

you are correct also...
delete the 3 lines of code and add

xBAM.Camera.RequestForControl True
 
Last edited:
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.
  • Quote
  • xenonph @ xenonph:
    I sent you message with pic showing where to make visible adjustment.
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Pinped has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    daleks12 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Stephen has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    docdoc has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Exnihilo_Mundus has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    angmarg52 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    tully619 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    smorndb has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tech49 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Topsi Klaus has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Forsaken43 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    duduky72 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Gerge has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    nunolilo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    DavidT2025 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Gary-7 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Thunderbird has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    alug has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    bluebird has left the room.
  • HZR @ HZR:
    It’s nice to go all see a place I can play actual machines!!!!
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Sunrise74 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Rai has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    liebowa has left the room.
      Chat Bot Mibs Chat Bot Mibs: liebowa has left the room.
      Back
      Top