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)
  • edited January 2023
    In your battle menu you can set events to trigger based on accepting, canceling, or closing an option on the menu. It's under the 'Status Changes' settings.

    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.
    Post edited by supportreport1 on
  • Nice! thanks I got it working
Sign In or Register to comment.