Hiya,
I am trying to implement a feature where, when a combatant selects a target to attack, the global light is turned off and a spotlight is placed on the opponent that is being selected. The goal is to make the scene dark except for the targeted opponent. I have attempted to implement this using game states, but I cant get this to work. Can you provide any advice or suggestions on how to accomplish this?
Thanks!
(btw I don't know if you played Child of light but that the effect I'm going for)
I would implement a schematic on accepting your attack option that will deactivate and activate the lights accordingly. You can manage your lights via something like tags, game states, or a variable/condition tied to them in a game object manager component. You can even just change a variable if you want to on accepting, it doesn't have to be a schematic.
Alternatively if you use a Target Selection menu and have an open schematic on that you can always trigger the lights you need that way too.
One other option would be using the methods I mentioned above while targeting to disable the global light and then use a Target Highlight Prefab that holds the spotlight in it, this would probably be easiest as you can move it easily between your targets.