I have tried:
function test11111()
if testp1:isDown() == true
fxtest:setLight(1, 0, 0, 10, 3, 200, true)
else
end
end
with a pressure_plate and a FX
(The script doesn't work)

Code: Select all
cloneObject{
name = "red_ceiling_light",
baseObject = "temple_ceiling_lamp",
particleSystem = false,
lightColor = vec(0.75,0,0), -- sets light to red. edit the three numbers to any r,g,b values between 0 and 1 to change the color
}
Code: Select all
function redlighton()
if testp1:isDown() == true
then
spawn("red_ceiling_light",level,x,y,facing,"myredlight")
end
end
Code: Select all
function lighton()
spawn("red_ceiling_light",level,x,y,facing,"myredlight")
end
function lightoff()
myredlight:destroy()
end