DE EN FR ES IT CZ
Back Back to top

Brightness Setting

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  • #1, by Pyke 17 years ago Quote
    Is it possible to add in a brightness setting that the player can use to brighten/darken the game?
  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by Suro 17 years ago Quote
    I think there already is something like that. You can apply this one in an action if you look for SCENE -> set brightness

    I didn't test out much with it, but I think you can't fade it in or anything. Maybe you can via scripting (which is way beyond me).

  • #3, by Nigec 17 years ago Quote
    probably talking cr*p here, but in another engine using LUA the script was:
    
    local Brightness=0.1
    
    function adjust_brightness(step)
    	Brightness=Brightness+step
    	if Brightness>0.5 then Brightness=0.5 end
    	if Brightness<-0.5 then Brightness=-0.5 end
    	--- something goes here to use visionaires set brightness)
    end
    
    
    then on + button
    
    adjust_brightness(0.01)
    
    
    -button
    
    adjust_brightness(-0.01)
    
    
  • #4, by mowren 17 years ago Quote
    Adapted for Visionaire Nigecs Code Sample might look like this:
    local Brightness=100
    local CurrentScene

    function adjust_brightness(step) CurrentScene=game:getLink(VGameCurrentScene) Brightness=Brightness+step if Brightness>100 then Brightness=100 end if Brightness<0 then Brightness=0 end CurrentScene:setValue(VSceneBrightness, Brightness) end

    When calling the function the parameters have to be in percentage values for Visionaire. With this you can adjust the darkness of a scene. 100% means clearly visible as in your graphic file data, 0% results in a completely black scene. The one drawback of this scene value is that you can't brighten up the scene.

  • #5, by Pyke 17 years ago Quote
    Fantastic guys! Ill give these all a try and get back to you. wink