
- get/set the strength (intensity) of the specular reflection
- float number
- 0.0 to 1.0
- 0.0 = no specular reflection
- 1.0 = maximum specular reflection
- Properties menu >> Material >> Specular >> Intensity

################## get the intensity of the specular reflection
# 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 intensity
mat_spec = mat.specularIntensity
################## set the intensity of the specular reflection
# 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 intensity
mat.specularIntensity = 0.5