
- get/set the specular color of the material
- float list: [ red, green, blue ]
red:
- range: 0.0 to 1.0
green:
- range: 0.0 to 1.0
blue:
- range: 0.0 to 1.0
- Properties menu >> Material >> Specular >> Color bar

################## get the specular reflection color
# import bge
import bge
# get the current controller
controller = bge.logic.getCurrentController()
# get object that owns this controller
obj = controller.owner
# There's only one mesh on my model
mesh = obj.meshes[0]
# And only one material on the mesh
mat = mesh.materials[0]
# get specular reflection color
mat_spec_col = mat.specularColor
################## set the specular reflection color
# import bge
import bge
# get the current controller
controller = bge.logic.getCurrentController()
# get object that owns this controller
obj = controller.owner
# There's only one mesh on my model
mesh = obj.meshes[0]
# And only one material on the mesh
mat = mesh.materials[0]
# set specular reflection color to light blue
mat.specularColor = [ 0.0, 0.0, 0.1 ]