I'm trying to setup a battle event that does 2 different things depending on whether the player is in a boss fight or not. The boss fight uses a special combatant group that has unique enemies only used in the that boss fight, so I came up with 2 different methods: giving the boss prefab the "Boss" tag, or using the "Check Group" node in Ork to see if the player is fighting the boss combatant group or not.

For the first method, I used the "Has Combatant Trigger" node to check if there are any enemies with the "Boss" tag.
image

For the second method, I set it up like so.
image

Neither method worked. Am I setting something up wrong, or are these the wrong way to do this in general?
  • Can't see the images, but that's probably best done via a (global) variable, e.g. setting a bool variable isBoss to true in the battle start event of boss fights.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • How do I create a global bool variable and change it to true when starting a boss fight?
  • Usually you'll use the event system's Change Game Variables node, e.g. in the battle start event.

    How's your boss fight started and what battle system type are you using? E.g. are you doing real time area battles and just walk up to the boss, or are you using Battle components, etc.?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2021
    I'm using Turn-based battle, and the battle is started by the player walking into a collider that loads the battle scene. The battle scene has a battle component that uses a battle start event to setup the battle.

    Specifically, I created a new variable in the Editor tab like so
    https://imgur.com/a/7GGfqml

    And then I setup the Change Variable node like so
    https://imgur.com/a/yclfb9N

    And I setup the Check Variable node like so
    https://imgur.com/a/Z9IlXi2

    But it still doesn't work. Am I doing something wrong?
    Post edited by Void on
  • You don't have to define variables in the variable tab, you can just use any key you want.

    However, you should use the Value value type for variable keys, not Game Variable. With Value you define the key directly, with Game Variable you use a text stored in a string variable of the defined key.

    Also, the Condition Type in the variable check should just be Variable, since you want to only check a variable. The Conditions condition type is available for checking nested conditions, e.g. A & (B or C), i.e. (B or C) would be a Conditions type needing only One to be valid.

    So, for your setup, use Value value type for the variable keys and only a simple Variable condition type checking for it. Also, make sure your Battle component uses the battle start event with the variable change to mark it as a boss fight.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.