Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setLightColour()

Purpose

Set the colour of a light source

Description

Set the colour of a light source to the specified value

Syntax

setLightColour( light, colour )

Arguments

light handle of the light source

colour colour name or RGB values { red, green, blue, opacity } between 0 and 1

Example

setCamera( {0, 10, 10 }, { 0, 0, 0 } )
bright = 50
col = white
light = worldLight( { -5, -5, -5 }, col, bright )
ballmodel = loadModel( "Kat Deak/Discoball" )
ball = placeObject( ballmodel, { 0, 0, 0 }, { 10, 10, 10 } )

loop
    clear()
    c = controls( 0 )
    if c.x then 
        col = red
    endIf
    if c.a then 
        col = green
    endIf
    if c.b then 
        col = blue
    endIf
    setLightColour( light, col )
    rotateObject( ball, { 0, 1, 0 }, 1.0 )
    drawObjects()
    printAt( 0, 0, "Press X for red light" )
    printAt( 0, 1, "Press A for green light" )
    printAt( 0, 2, "Press B for blue light" )
    update()
repeat

Associated Commands

pointLight(), pointShadowLight(), removeLight(), setAmbientLight(), setLightBrightness(), setLightDir(), setLightPos(), setLightSpread(), spotLight(), worldLight(), worldShadowLight()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.