Download

light on and off ,getting closer

Hi

I try to make the blueprint that turn on and off the pendant light.(attachment jpg “01"and"04”)

I want to have the two materials in the pendantlight, the frame of that has black metal and lightbulbs have glowing white materials.

And If FirstPerson get closer to the pendant light,I want to light turns on.

Like the attachment files I make the blueprint,It worked well done except for one point.(attachment jpg “02”)

The bulbs with the pendant light have multiple meterial elements in the material slots.

Lightbulb glowing material should have been just one ,but two same materias have done.

“Element index” of the "Set Material " in the blueprint can’t only set one element index.(attachment jpg “03”)

I want to turn on and off both of the element one and the element two.

because,there are two same materials “lightbulb”.

I 'd like to set two element index (1and2),and so all the bulb can light on and off .

Of course,in the DCC tool It should be fixed,if you can ,I would like to be possible in the blueprint.

Please tell me something good suggestion.Could you help me?

Sorry ,I’ m not good at english.

Just make 2 dynamic materials:

2mat.gif

Hi!
Thank you so much,I’m grateful.I’m closer to doing what I want to do.
Certainly,I did say that I get closer to the pendant light.
But exactly when I pressed the L key,I wanted to turn on and off.
Therefore I’m setting flip flop ,so I press the L key to switch between the two.
What can I do to add this flow to your suggestion?
I’m not programmer,so I 'm not good at blueprint.
Please help me.

Then use the same BeginPlay as above, but also:

Thank you for all your help.
I can’t think of that you put two variable “Mat” in the Target of Set Scalar parameter Value.
I’ll try it.