Demo: Switching materials or lights on/off with boolean & object property

#1

There was a couple of similar questions on the Armory Discord on how to use nodes to switch materials on an object and how to switch a light on / off. So, this post is a basic example of how to switch back and forth between two states using boolans (a variable that has just two states, eg on/off or true/false). This is fairly basic node logic use combined with a bit of object properties (ie you have to add an object property called “material” to any object for it to work).

Just load it up and press space a couple of times to see how the material switches and the second light goes off and on. You can see all of the logic in the MaterialSwitch logic node tree.

Feel free to ask any questions down below!

Blend file (Armory 0.6):

switch.1.blend (858.9 KB)

4 Likes