Hi.
I have two questions about GridBattle.
Sry Im not good at english.

1) Spawning combatant problem
My wizard have spawn ability and spawn warrior,
the warrior is normally attacked by enemy when Battle AI attack all enemy.
But I try to filter target by check status(faction, combatant, etc), its not work for combatant spawned by ability.
image
image
image

2) Battle Range Template Raycast
I simply put cube after grid placement and try to use Ranged ability,
raycast go through a little.
image
image
image

Any tips or advice?
  • 1) I'm not sure what you're trying to do here.
    If you want to place the (existing) player on the grid, there are the Spawn Battle Combatants (spawns not yet spawned combatants that participate in battle, in grid battles they're spawned on deployment cells) and Place On Grid (places already spawned combatants on the grid) nodes for this.

    What you're doing is create a brand new combatant and spawn it. That combatant isn't participating in battle (unless you also use a Join Battle node using the spawned combatant) and is also not the player or part of the player group, even if you use the player faction.

    2) Is the cube on a layer defined by the Layer Mask of the raycast?
    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!
  • 1)
    Sry I couldnt explain well.The ability is summoning ability and I want to create a brand new combatant.So I should use JoinBattle node.Probrem solved. thanks.

    2)
    Yes, the cube is Default Layer and LayerMask is Default.The cube affect range but not perfect.

    3)
    I have new problem about BattleAI.How to select attack target as random found target within use range?I checked Force Found Targets and Need Targets but AI attacks target not included in found target.
  • 3)
    When Battle AI Attack node performs with no valid found target and valid enemy not included in found target,attack peforms?So I filter found target by InUseRange node before Attack node and looks working.Are there any good ways?
  • Force Found Targets and Need Target checked.
  • 3) Most likely the battle AI doesn't find a useable action - in this case, the combatant will fall back to using the base attack on a target based on it's AI settings (e.g. nearest or last target based on the combatant's AI setup).
    For those cases it's recommended to have a battle AI with a None action (i.e. doing nothing) as the last battle AI of your combatants (that's used in all tutorial series).
    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!
  • 3) Doing nothing is already added at last.My battle AI is similar to 2D Grid tutorial.
    Attack node Force Found Targets and Need Target checked with 0 found target attacks when other enemy in range.I set Unity Console node in Base Attack and Do nothing and last log is from Base Attack.

    2)This is the biggest problem.Help me please.
  • 2) I'll do some tests.

    3) Is there any other battle AI added that uses the base attack?
    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 August 6
    3) My test AI is

    Provoked - same as 2D Grid Tutorial
    Base Attack - change from 2D Grid Tutorial
    ・Clear Found Targets checked
    ・Force Found Targets and Need Targets of Attack node checked
    Do Nothing - same as 2d Grid Tutorial

    I want this AI never attacks, but attacks when enemy in range.

    4)I want to add height check for combat. Combatant have min-max attackable height and if Enemy's top or bottom is in min-max range,combatant can attack.But User of Ability - Target Selection Settings - Conditions - Target Conditions is Enemy not ability user?How to check ability user information or store active combatant as global variable?
    Post edited by Jeff on
  • edited August 6
    2) Tested and and found the issue - will be fixed in the next update.

    3) Well, if you first clear the found targets, there are no found targets to force.
    So, using the In Use Range node to get only targets in range is the way to go here. You can also use a Check Target Count node afterwards to see if targets are available in range, using Attack or None actions based on that.

    4) Do you mean the height difference between cells or some height variables of user and target?
    Cell height differences can be checked in the battle ranges, but the target conditions currently only check the target, so you don't have access to user variables there.

    For this, you could store the variables of the user into global variables in the combatant's turn start schematic (e.g. in the general settings for all combatants to automatically do it for all). So, you'd check the Object variables of user or target in the target condition against a global variable (which holds the actual user combatant's variables).
    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!
  • edited August 6
    2)Thanks.I'm waiting for next update.

    3)Understood. I'll try it.

    4)Does Battle Range - Grid Shape - Variable Conditions have any access to base cell ?Target cell can access via Local origin.If not, Can I request this feature?
    Post edited by Jeff on
  • 4) The Local variables are the variables of the checked cell, but the Object variables of the User would at least have the variables of the combatant using the range (e.g. user of the ability) available.
    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!
  • 4) Sry I didn't explain well enough.
    I noticed when I try to use long range explosion magic with affect range ,it is needed to check the local value of center cell and other affect range cell.
    So I want to access Battle Range base cell.
  • 4) No, each cell is checked individually so they only have access to their own variables.
    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 request any access to origin cell in Battle Range - Grid Shape - Variable Conditions ?
    or any access to object variables of checked cell in Battle Range - Grid Shape - Check Height Differences?
Sign In or Register to comment.