What I want to do is to use different values for the position and scale (is 2D game, enemy or player doesn't move) depending on how many enemies appears.

The Conditional Battle Spots appears to do exactly that, buuuuut I have no idea how to set it up.

what I did till now with no result:

added a condition to check for a global int variable value, named MyEnemyCount for the Conditional Battle Spots logic

then

in the BattleStart Schematics I've added a "Store Combatant Node" using MyEnemyCount variable.

Printing the variable MyEnemyCount with Unity Console show nothing so it doesn't work. is not set.

I've seen on forum someone using the User Combatant set to Actor and then adding a group. Enemy Group or Player group.

Unfortunately I don't have the Actor choice even if is listed in the help text.

image

image
  • @dorusoftware Not entirely sure about the rest of the issue, but Actors are set in Schematics when you click on the initial node.

    There you can define actors from other predefined ones, and/or stuff like GameObject.Find:

    image
  • ok, Thank You that fixed the issue with getting the number of enemies. I've set on the initial node on the Actors tab to "Enemies (Battle)" then the Actor option appeared in the "Store Combatant Node" node. I've used the Enemies (Battle)" there and it gets the correct number of enemies.

    unfortunately the Conditional check doesn't appear to find or check for the variable I've set.

    I've tried to move the "Store Combatant Node" around in the schematic chain but no luck.

    image
  • For conditional battle spots to depend on group size, add a Combatant Status condition. They can check for Group Size.

    Generally, anything combatant/group related has a high chance to be available as a status condition :)
    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!
  • ok got it! This asset is very complex, I didn't knew there are all these sub menus :) Here is a reference on how I've set this up. There is no need for the part in the schematics with the variable, it works only with the setup bellow

    image
  • I have a related question. What could be the recommended approach for this scenario:

    battle spawn 3 enemies, they are placed to their specific spots as done above.

    then one enemy dies, and the remaining 2 should be animated/placed to the conditional battle spots that is specific for 2 enemies.

    then after another one is killed, the same, the last one should be moved to a spot that is specific for a single enemy (I don't have this spot set as "conditional battle spot" but I can add it if required.

    My idea is after an enemy dies to call the place as spot again? Is this something that could work? Maybe add this logic into a death schematic?
  • edited April 2023
    Hm, you can probably do that in the death schematics animating a combatant's death, manually placing the remaining combatants.
    The Place At Spots node currently only places combants without battle spots, I'll look into adding an option to re-place them.
    Post edited by gamingislove on
    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!
  • Can I move the battle spots themselves? Or do I need to create new battle spots then move the characters to that new battle spot?

    I don't even know if this is possible. Sorry :)

    The best option would be to have check mark to automatically jump trough the selected battle spots if they match the number of the enemies.

    Optionally recheck the initial logic and if it matches the "conditions" move or replace battle spots

  • You can move the battle spots - the Select Combatant Battle Spot node allows you to get the battle spot of a combatant and store it into selected data. That way you can use it in other nodes. The battle spot actors (e.g. type User Base) are only useful for schematics animating actions.

    Battle spots (in battle) are just game objects and you can move them around however you like :)

    I'll look into adding better options for this in the next update.
    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.