Just trying to figure out how to word this lol.
I have a tag-based ‘lightswitch grouping’ set of blueprints. One Lights_BP, and one LightSwitch_BP.
If I tag my light and it’s respective light switch ‘bathroom’ for example, it will only turn off/on the bathroom lights.
I have several different meshes to go with the lights_BP and here lies the problem: I’ve got a dynamic material instance which controls a scalar parameter for emissive on one of the materials assigned to my light. On the standard mesh this is Element 1 while on a second light mesh this is Element 3.
Inside my Lights_BP in the construction script I have a setup that exposes the Create Dynamic Material Instance Element Index to a variable I made named Material Element Index
http://i.imgur.com/dfYmBYS.png
I have this variable set to public so I can modify it in the details pane per instance in the level, but it doesn’t seem to want to cooperate. When the variable in the details pane is left at 1 everything runs fine, but the emissive appears on the wrong material.
Upon changing the variable to the proper element index for the mesh I get an accessed none error that reads:
Accessed None ‘Dynamic_MAT’ from node Set Scalar Parameter Value in graph ‘EventGraph’ in blueprint Lights_BP
http://i.imgur.com/28maqWz.jpg
Last but not least I’ve attached some reference screenshots below:
http://i.imgur.com/UpRvWrw.png
Light Mesh #1
http://i.imgur.com/nW7h3oR.jpg
Light Mesh #2