Quote: "Basically, I will have a light (entity) in a room. If you shoot and destroy it I'd like to destroy a light marker (if possible). If that's not possible I won't use a marker and will just change the ambient level. Either way, I want the room dark. That being said, I don't want enemies to be able to attack you.
Sound feasible?"
Sure it is just use a variable for a flag.
Initialize the variable to zero.
Then, set it to any other value, lets say one for simplicity, when you flip off the light.
Also, have a condition that checks the value of that variable in the attack state of the characters script.
If it equals zero then the light is on and you would advance to a state of attack.
If it equals one then the light must be shot out and you would advance to an idle state for the character.
So, what you are talking abou is a customized attack script, and a light script to increment the variable on destroy.
Each light could be based on a different variable, so this would only affect the characters in that room using that particular light.
Yes, it is very feasible.