I have this script.
import bge from initialization import initialization initialization(__name__) scene = bge.logic.getCurrentScene() cont = bge.logic.getCurrentController() obj = cont.owner act = cont.actuators["Aura"] status = act.visibility if Flashlight["targetName"] == str(obj).replace(" ","_"): status = True cont.activate(Aura) print ("TRRRRUUUUUUUUUUUUUUEEEEEEEEEE") else: # status = False cont.deactivate(Aura) print ("FAAAALLSEEEEEEEEEEEEEEEEEEEEE")
It works, but I wondered why setting the
status = False (at line 17-comment) and then swapping the line with
cont.activate(Aura) would not work.
So my question: Doesn't "act.visibility" toggle the "Visible" box option to ticked if True and unticked if False? If yes what does it do and how can I swap the status of the "Visible" box option. *searching for a python solution
p.s. My script checks a string value, if it is equal to the object's name it makes a mesh that acts as an aura visible for as long as the value remains equal.