How di I change material settings with logic bricks?

Yep, how? I have tried searching the forum without luck, and I have tried applying key frames to the shading emittion on the material. That created a material action, which was a small step in the right direction, but it didn’t work at all in-game.

How does this really work?

I want my object to “highlight” on mouseover or key press…

Oops… spelling error in the title…:stuck_out_tongue:

Animating emission or pretty much anything in the materials pannel won’t work in GLSL mode but some might work in multi-texture.
But for animating color in GLSL, go into the materials pannel and under the options tab, check object color. Then you can animate the color in the objects pannel under the display tab.

You can try to change the mesh for another one with the glow while pressing

Ok, Jacob, thank you for the good advice!

BUT I tried it like this: I checked object color under material options, then I went to frame 1 and chose a color in the object display. Then I went to frame 5 and chaned the color. This was added in the logic bricks as an action for key press. But when I got in-game (glsl) and pressed the key, the whole object disappeared in a pop! I tried running it in multitexture, then the object just turned black on key press… Strange indeed.

My last option is to swap the visibility to a duplcate object with another color but that feels so cheap…

You forgot to animate the alpha channel.
Just check transparency, go to frame 1 and animate the alpha of the object while it’s 1.000.

Quick example… green glow on click


glow.blend (700 KB)

If what you need is animate colours and not texture, you could make something like here.


Thanks guys, I’ll have a look at it tonight :slight_smile: