Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 102 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 11  Next
Author Message
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 9:23 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2855
Location: Ontario, Canada
Are you using miniplayfield for your gameroom?
If so just set second last number in your miniplayfield code to 0

"Call miniplayfield_0.moveto (bla bla , 0, bla)"

If you look at the grid above the code, you can see this is number for "Scale"
Setting Scale to 0, makes your room disapear
Code:
'                              DstX    DstY    DstZ   RotX   RotY    RotZ   Scale    Time
Call MiniPlayField_0.MoveTo(  132.3,   636.7,   0.6,      0,     0,      0,      1,      0)


See this
viewtopic.php?nomobile=f=55&t=6587&p=85657#p85657

You really have 3 options:
1.Wild GameRoom on (FP GameRoom Off)
2.FP GameRoom On (Wild GameRoom Off)
3.Both off (Room is black)

1. Wild GameRoom On
Code:
xBAM.GameRoom = False
Call miniplayfield_0.moveto  (bla,bla,bla, Previous Scale Number, bla)


2. FP GameRoom ON
Code:
xBAM.GameRoom = True
Call miniplayfield_0.moveto (bla,bla,bla,0,bla)

3. Both Off
Code:
xBAM.GameRoom = False
Call miniplayfield_0.moveto  (bla,bla,bla, 0, bla)


So, If you want 3 options with keycode = 34 then I can take your code and change it like this:

Code:
If KeyCode = 34 Then  'key G
  GameRoomOnOff = GameRoomOnOff + 1
 If GameRoomOnOff > 3 then GameRoomOnOff = 1
   If GameRoomOnOff  = 1 Then
      xBAM.GameRoom= false
     Call Miniplayfield_0.moveto  (bla, bla, bla, bla, Scale Number,bla)
   End if
   If GameRoomOnOff  = 2 Then
      xBAM.GameRoom= true
     Call Miniplayfield_0.moveto  (bla, bla, bla, bla, 0,bla)
   End if
   If GameRoomOnOff  = 3 Then
      xBAM.GameRoom= false
     Call Miniplayfield_0.moveto  (bla, bla, bla, bla, 0,bla)
   End if
  End if
   


Last edited by Gimli on Wed Feb 28, 2018 9:32 pm, edited 5 times in total.

Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 9:55 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
ok,but you could make an effort, more....I like it, and I understand the subroutine

Code:
Sub GameRoomBamOn()
Dim MiniPlayField_1        '                             Xmin     Xmax     Ymin     Ymax     Zmin     Zmax     CenX     CenY     CenZ
Set MiniPlayField_1        = xBAM.CreateMiniPlayfield(   -400,    -80,      300,     700,      50,     300,    -300,    405,       0)
'                              DstX     DstY      DstZ     RotX     RotY     RotZ    Scale     Time
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   25.000,    0)
End Sub


Sub GameRoomBamOff()
Dim MiniPlayField_1        '                             Xmin     Xmax     Ymin     Ymax     Zmin     Zmax     CenX     CenY     CenZ
Set MiniPlayField_1        = xBAM.CreateMiniPlayfield(   -400,    -80,      300,     700,      50,     300,    -300,    405,       0)
'                              DstX     DstY      DstZ     RotX     RotY     RotZ    Scale     Time
CCall MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)
End Sub



because in this way it does not work for me

Code:
If KeyCode = 34 Then  'key G
   If GameRoomOnOff  = TRUE Then'on
      GameRoomOnOff  = FALSE
      xBAM.GameRoom= false
      GameRoomBamOn
   Else
   If GameRoomOnOff  = FALSE Then'off
      GameRoomOnOff  = TRUE
      xBAM.GameRoom= true
      GameRoomBamOff
         End if
   End if
   End if


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 10:02 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
all those if, and blah blah blah, confuse me, if you can give me a codec using this way,as a basis

Code:
If KeyCode = 34 Then  'key G
   If GameRoomOnOff  = TRUE Then'on
      GameRoomOnOff  = FALSE
      xBAM.GameRoom= false
      GameRoomBamOn
   Else
   If GameRoomOnOff  = FALSE Then'off
      GameRoomOnOff  = TRUE
      xBAM.GameRoom= true
      GameRoomBamOff
         End if
   End if
   End if


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 10:03 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2855
Location: Ontario, Canada
Very close Paolo,
you only use "Dim" and "Set" once at the top of the script

I would change to :

Code:
Sub GameRoomBamOn()
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   25.000,    0)
End Sub


Sub GameRoomBamOff()
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)
End Sub


And if you want the FP GameRoom as an opton then:

Code:
Sub GameRoomBamOn()
xBAM.GameRoom = False
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   25.000,    0)
End Sub


Sub GameRoomBamOff()
xBAM.GameRoom = True
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)
End Sub

Sub BothRoomsOff()
xBAM.GameRoom = False
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)
End Sub



Code:
If KeyCode = 34 Then  'key G
  GameRoomOnOff = GameRoomOnOff + 1
 If GameRoomOnOff > 3 then GameRoomOnOff = 1
   If GameRoomOnOff  = 1 Then GameRoomBamOn()
   If GameRoomOnOff  = 2 Then GameRoomBamOff()
   If GameRoomOnOff  = 3 Then BothRoomsOff()
  End if



Remember that if we choose to use "GameRoomOnOff" as a number instead of true/false (so we can have more than just 2 options) , then we have to always use it as a number.

Code:
Dim GameRoomOnOff

Sub FuturePinball_BeginPlay()
GameRoomOnOff =1
xBAM.GameRoom = False


Last edited by Gimli on Wed Feb 28, 2018 9:34 pm, edited 2 times in total.

Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 10:32 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
ok, but the sub.....this

Code:
Sub GameRoomBamOff()
Dim MiniPlayField_1        '                             Xmin     Xmax     Ymin     Ymax     Zmin     Zmax     CenX     CenY     CenZ
Set MiniPlayField_1        = xBAM.CreateMiniPlayfield(   -400,    -80,      300,     700,      50,     300,    -300,    405,       0)
'                              DstX     DstY      DstZ     RotX     RotY     RotZ    Scale     Time
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)
End Sub


What I do I leave, I take it off, what I have to do


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 10:47 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
what is this BothRoomsOff()


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 10:48 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2855
Location: Ontario, Canada
Remove
Code:
Dim MiniPlayField_1        '                             Xmin     Xmax     Ymin     Ymax     Zmin     Zmax     CenX     CenY     CenZ
Set MiniPlayField_1        = xBAM.CreateMiniPlayfield(   -400,    -80,      300,     700,      50,     300,    -300,    405,       0)


and leave
Code:
Sub GameRoomBamOff()
'                              DstX     DstY      DstZ     RotX     RotY     RotZ    Scale     Time
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)
End Sub


instead of
Code:
Call MiniPlayField_1.MoveTo(   -1500,    -2000,   -3000,     0,       0,       0,   0,    0)


To make you games room disapper, you may find it easier to use:
Code:
MiniPlayField_1.Scale = 0


and to make it reappear:
Code:
MiniPlayField_1.Scale = 25


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 10:54 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2855
Location: Ontario, Canada
so if you want to use miniplayfield_1.Scale code then:
Code:
Sub GameRoomBamOn()
xBAM.GameRoom = False
miniplayfield_1.Scale = 25
End Sub


Sub GameRoomBamOff()
xBAM.GameRoom = True
miniplayfield_1.Scale  =0
End Sub

Sub BothRoomsOff()
xBAM.GameRoom = False
miniplayfield_1.Scale = 0
End Sub


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 11:14 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1231
I'm not understanding anything anymore send me a demo, or I'm no longer on-off


Top 
 Profile  
 
 Post subject: Re: BAM Commands Comment and Discussion
 Post Posted: Wed Feb 28, 2018 11:19 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2855
Location: Ontario, Canada
I am going out for the day but if you look at xBAM.GameRoom tutorial link I posted above...
you can download the mod of your DragonsKeep table, where I do some of this...use "B" on keyboard to switch rooms
https://www.dropbox.com/s/myt16p8ufvfxu ... h.rar?dl=0


Last edited by Gimli on Wed Feb 28, 2018 12:09 pm, edited 1 time in total.

Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 102 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 11  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 5 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: