Ive been getting lights set up in game and have come to see that the whole light switch thing is a tad misleading or Im just not understanding things.
Is there a setting to simply send a message to toggle On / Off or do I need to use 2 hot spots
in order to toggle a light on/off?
I assumed it would be more along the lines of
"SendMessage Toggle On or off depending on the current state"
Instead I see Im sending 2 messages one "Send On " while the other hotspot sends out the "Off"
This seems all wrong to me.There must be a cleaner way to accomplish such a simple task.
Comments
Yes you are right, it would be nice to send a toggleSwitch depending if it's on or off.
But you don't need two hot spots. Just store the state of the light into a variable and check it in the interaction/ActionList like so:
1. Check variable isLightOn == true -> skip to 4 else continue
2. Message Send TurnOn : continue
3. Set variable isLightOn = true : stop
4. Message Send TurnOff : continue
5. Set variable isLightOn = false : stop
I knew I was jumping through to many hoops for such a simple task.
Thanks again!
I turn on the light, save game 1, quit..........
Load Game 1 , I need things to return back to its former self.
Example : Lights on, door is open, crate is smashed and so on....
Im only focusing on the lights for the time being. I assume the rest will fall into place.
However,, I cant seem to find out how to force the lights to the last know state.
Does anyone know how I can fire off a "check" when the game loads / scene loads to set the lights on / off according to the saved state?
Alternatively, try moving the lights out of the scene's view (e.g. 1000 units downward) instead of turning them on/off. The RememberTransform script will then save their position automatically - no need for variables or manually setting with Cutscenes.