SetSceneBrightness (CMS)

From The Official Visionaire Studio: Adventure Game Engine Wiki
Name Type By
setSceneBrightness("scn" or nil, n) Definition AFRLme

This small function allows you to quickly set the brightness value of the current scene or a specific scene.


1. Add the main script to the Visionaire Studio Script Editor & set the script as a definition script.
2a. To use this function you should create an execute a script action containing...

setSceneBrightness("scene_name", 80) -- sets the linked scenes brightness value to 80%

2b. Alternatively to automatically link to current scene use this method...

setSceneBrightness(nil, 80) -- sets the current scenes brightness value to 80%

Main Script

function setSceneBrightness(scn, n)
 if scn ~= nil then
  getObject("Scenes[" .. scn .. "]"):setValue(VSceneBrightness, n)
  game:getLink(VGameCurrentScene):setValue(VSceneBrightness, n)

Syntax Breakdown

Name Type Description
scn "string" or nil This should be a "string" value containing the name of the scene you want to affect else it should contain the word nil.
n integer This should be an integer (number) value which will determine the brightness value of the linked scene (scn) or the current scene if nil was used.