Skip to reading
Shaders, Effects & Layered Scenery

70. Switch the inherited screen look by script

Edition 0.86.4.0

Revised 0.86.4.0 edition with new supplements; earlier 0.86.3.4 lessons and screenshot labels are retained within the supplied PDF.

Download PDFView PDF page

Change Game Setting can replace the whole global scene-shader configuration. This is a convenient way to keep a style’s layers and dedicated options together. The room must use the global stack for that change to affect its appearance.

Code example
extends PCAScriptBase
Code example
func run() -> void:
    await ChangeGameSetting({"setting":"globalSceneShaders",
        "value":{
            "layers":[{"preset":"psx","intensity":1.0}],
            "psxPixelSize":3, "psxColorBits":5,
            "psxDither":1.0, "psxJitter":0.0
        }})

To clear that runtime look and any held pulse/shake, use this separate record:

Code example
extends PCAScriptBase
Code example
func run() -> void:
    await ChangeGameSetting({"setting":"globalSceneShaders",
        "value":{"layers":[],"preset":"none"}})
    await StopZoomBlur({})
    await StopScreenShake({})

Change Project Property with a settings.globalSceneShaders path reaches the same project group. For one dedicated option, Change Game Setting can use a path such as globalSceneShaders.psxColorBits.

Clearing a global stack does not override a room using Custom or Disabled. A restore action also needs a deliberate design: restore the previous configuration if the game already had a normal style, rather than assuming “no effects” is always the correct default.

Page 74 of 93Permalink
Go to page