Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Preset DAY light in script
 Post Posted: Tue Dec 31, 2019 6:16 am 
Offline

Joined: Wed Sep 21, 2016 12:24 pm
Posts: 142
Hi,

How can I put the Preset Daylight by default in a script ?

Thx


Top 
 Profile  
 
 Post subject: Re: Preset DAY light in script
 Post Posted: Tue Dec 31, 2019 7:08 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2586
Location: Arkansas, USA
It is pretty easy. You open the Lights menu and set it up the way you want. Then just hold down the Ctrl key and press C. Then open script and paste into script. I'm not sure what you mean "by default" but once you have it in the clipboard, you can past the same thing into many tables.


Top 
 Profile  
 
 Post subject: Re: Preset DAY light in script
 Post Posted: Tue Dec 31, 2019 8:35 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2586
Location: Arkansas, USA
I keep forgetting this because I never do it this way. The code that is copied to the clipboard as described in my previous post is a subroutine. You have to add this line to the subroutine "BAM_Init" to make it run:

SetLightsParamsInBAM()

I haven't tested this in a while, but I think this is supposed to load the light settings the first time the end user plays the table and then the end user can make changes to the light menu. Then the end user's settings are used from that point on.

This might not work for you, especially if you are adding the code to tables you have already played. You might try deleting the first line of what is in the clipboard (the line that starts with "Sub"). Then delete the line with "End Sub" at the end. Then paste it in the script and not add the line to "BAM_Init" as described above. I think this will always load the settings from the script. You won't be able to change the settings on the light menu anymore but you can change them in the script.


Top 
 Profile  
 
 Post subject: Re: Preset DAY light in script
 Post Posted: Thu Jan 02, 2020 6:09 am 
Offline

Joined: Wed Sep 21, 2016 12:24 pm
Posts: 142
Ok, it is not really clear but I will try.
I thought it was more "simple" to make the Daylight by default :)


Top 
 Profile  
 
 Post subject: Re: Preset DAY light in script
 Post Posted: Thu Jan 02, 2020 7:19 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2586
Location: Arkansas, USA
BAM saves the light settings to the CFG file whenever you make changes so the next time you load the table it will be as you set it. In fact, the settings are saved when you use the option to "Save as Default" also. ...So in most cases you don't need to save the settings to the script at all.

This will work as long as you are not using one of my modded tables with the special light settings. For these, I provide directions on how to add your settings to the table in the posting.

George


Top 
 Profile  
 
 Post subject: Re: Preset DAY light in script
 Post Posted: Fri Jan 03, 2020 4:27 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1261
Location: Italy
here are some examples, they are the ones I use, in my recent tables....day-night,you can alternate according to your preferences in your script
these settings are without, new renderer active, I assume you know what it is,and what pc you need... if you want to change just replace this
xBAM.Lights.EnableNewRenderer = TRUE

Sub SetLightsDay()
xBAM.Lights.EnableNewRenderer = FALSE
xBAM.Lights.MainLightLock = FALSE
xBAM.Lights.SetMainLightPosition 0, 650, 500
xBAM.Lights.SetMainLightProperties 1, 0.6, 0.5, 0.3
xBAM.Lights.SetMainLightAttenuation 1, 0, 0
xBAM.Lights.SetOtherLightsAttenuation 0.2, 0, 1
xBAM.Lights.EnablePostprocessing = FALSE
xBAM.Lights.SetPostprocessing 1, 0, 1, 1
xBAM.Lights.SetPostprocessingForNewRenderer 1, 0, 1, 1, 2.2, 1, 1, 1, 0.2
SurfaceApronOff.Render = false
SurfaceApronOn.Render = true
End Sub


Sub SetLightsNight()
xBAM.Lights.EnableNewRenderer = FALSE
xBAM.Lights.MainLightLock = FALSE
xBAM.Lights.SetMainLightPosition 0, 650, 500
xBAM.Lights.SetMainLightProperties 1.5, 0.625, 0.75, 0.1
xBAM.Lights.SetMainLightAttenuation 1, 0, 0
xBAM.Lights.SetOtherLightsAttenuation 0.2, 0, 1
xBAM.Lights.EnablePostprocessing = FALSE
xBAM.Lights.SetPostprocessing 1, 0, 1, 1
xBAM.Lights.SetPostprocessingForNewRenderer 1, 0, 1, 1, 2.2, 1, 1, 1, 0.2
SurfaceApronOff.Render = true
SurfaceApronOn.Render = false
End Sub


Top 
 Profile  
 
 Post subject: Re: Preset DAY light in script
 Post Posted: Fri Jan 03, 2020 5:46 am 
Offline

Joined: Wed Sep 21, 2016 12:24 pm
Posts: 142
Thx I will try this !


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 7 posts ] 

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 17 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: