I have a active time battle system where move ai is allowed...
i can control the player group in some directions but when i run into a range for example my base attack ability has a range of 1..and when im out of range i ran into that range and Press the attack Button nothing happens..that means i have to be in that range to Start the base attack..and when im out of range i need to be in that range and the turn is over.

Do you have some thoughts @gamingislove ?

  • Generally, AI controlled combatants will use their move AI (if it's allowed during battle) to move into range of a selected ability.

    For player-controlled combatants, actions can only be used when within use range - but you can optionally limit the range to only be used by AI controlled combatants, so the player could use them without range limitations.

    I'd need more information on your setup and how you want it to work to tell you more for your issues :)
    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!
  • Okay...can i send u my Problem in a Video via Email?
  • Checked the video and screenshots you sent - I think this is mainly due to the range template's setup.

    1) The maximum range ignores the radius of the combatants, i.e. to be useable, the player has to be within 1.2 world units to the target, from the player's pivot to the target's pivot. Not 100% sure that's the case e.g. in the video.
    If the radius is taken into account, the distance is measured from the edge of each combatant's radius, e.g. if each has a radius of 0.5, the total distance would be 2.2 (1.2+0.5+0.5).

    2) Since you're using line of sight check, it might be something that blocks the LoS.
    Especially since you check on all layers and not use any child objects for the check - i.e. they'll check from the combatant's pivot (usually at the feet), so the terrain can easily get in the way.
    I'd recommend to place some child objects on your combatant prefabs for that and use it for the line of sight. E.g. in the center or the head of the combatants.
    Also, you should limit the used layers to things that can get in the way, e.g. other combatants, terrain and other level architecture (walls, 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!
Sign In or Register to comment.