Game Development Community

Change the color of PointLight (ingame)

by Marcos Rodriguez · in Torque 3D Beginner · 03/22/2010 (4:01 pm) · 4 replies

(First i'm sorry for my english...)

I just downloaded Torque3D (demo) and start to test some things...
Only want to do a simple action: change the color of a light.
I created a Trigger,and in the "OnEnterCommand" i put this code:
Light1.Color = "1 0 0 1" //RedColor

but don't works...the parameter is changed in te properties of object...but it's not "refreshed" on the screen (so... the Light1 remains in White :( )

It is possible do that in Demo-Mode? or.. in what im wrong?
Thanks :)

About the author

Recent Threads


#1
07/16/2010 (3:20 pm)
Hey

I have the exact same problem! Can someone helps us with this problem?
#2
07/19/2010 (12:52 am)
Are you guys trying to have the light change between colours or just trying to have the light colour change from the default white?

If you're trying to get the light colour to change from the default; when you're in the editor go to the Library tab, then to the Level tab, then select Environment, then Point Light. Then go back to the Scene tab, make sure the Point Light is selected, and under the Light properties you'll see a colour selection, click on the white box and select the light you want.

You can also edit multiple parameters of the light, switching between multiple colours I'm unsure of however.
#3
07/19/2010 (1:16 am)
Mack, I think they want to make something akin to an "alarm sensitive area" where if a player steps in a certain spot, the lights will turn red and perhaps flash.
#4
07/19/2010 (5:47 am)
Yes! is like EB say, change the color ingame, not in the world editor.
Something like "when enter to the trigger, change the pointlight from white to red"...for example...or move the pointlight tho other coordinates...

In short: changing values of pointlight, by code, in the game.
Maybe I not explain very well, sorry.

Thanks for the replies! :)