Brightness Setting

  • #1, by PykeMonday, 14. March 2011, 10:32 12 years ago
    Is it possible to add in a brightness setting that the player can use to brighten/darken the game?

    Newbie

    59 Posts


  • #2, by SuroMonday, 14. March 2011, 20:44 12 years ago
    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).

    Newbie

    36 Posts

  • #3, by NigecMonday, 14. March 2011, 22:53 12 years ago
    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)
    
    

    Key Killer

    593 Posts

  • #4, by mowrenTuesday, 15. March 2011, 01:15 12 years ago
    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.

    Newbie

    10 Posts

  • #5, by PykeTuesday, 15. March 2011, 13:27 12 years ago
    Fantastic guys! Ill give these all a try and get back to you. wink

    Newbie

    59 Posts