Nirtec Studio Forum

General Category => Machines Simulator => Topic started by: AndersG on December 07, 2011, 01:55:48 PM

Title: Ilumuinated Push button
Post by: AndersG on December 07, 2011, 01:55:48 PM
Hello,

Is´t hard to make some  Ilumuinated Push button with 1 input when pressed and 1 output to get it to light. With coulor red, green, blue, yellow and white.
Title: Re: Ilumuinated Push button
Post by: EasyPLC_Master on December 07, 2011, 04:33:35 PM
I don't agree!.
I think is easy to create a iluminated push-button using the lighting properties of the objects.
You only must to add a code like this to enable the light emissive property that allows to set the amount of light emitted by the object.

if(IO.GetOutput("Light")) //example output use to activate the button light
{
   box[1].EmissiveColor = new Vector3(0.7f,0.7f,0.7f);
}
else
{
   box[1].EmissiveColor = Vector3.Zero;
}

Here I attach an example, then will be easier to understand.

[attachment deleted by admin]