Good morning,

I have a project with my colleagues to make an RPG that looks like Dragon Age 2. We control a team of 4 people and only one character is active and is controlled by the player. Your character must be able to target an enemy and move in their direction until they are in range to attack. At the same time, the player must be able to cancel his action if he wishes to cancel his attack and just move, for example. How should I go about it?
I tried with the target settings in battle using the "individual target Settings" but I couldn't get it to work.
Thank you so much
  • The battle range templates used for your action's use range has Move AI Settings to move into use range when being out of range - but this is only used by combatants that use the move AI, e.g. the current player isn't using move AI (but other group members can use it).

    Canceling an action can be done using schematics, e.g. using the Stop Battle Action node (active actions) or the Remove Battle Actions node (scheduled actions). Both can be set up to stop/remove the actions of a specific combatant.

    The group/individual targets are used to 'mark' a combatant as a target for the group or an individual combatant. Other functionality (e.g. control maps, battle AI, battle menu, etc.) can use those for targeting.
    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!
  • When I launch the game menu I am able to target the enemies and move towards them to attack them, but I still have a problem which means that when I move and once stopped I click on the enemies to attack them my shematic launches and draws the weapon but the player refuses to move. On the other hand, if I move and during the movement I target an enemy it will play the entire schematic with the movement. I just don't understand why after a movement I can no longer move to attack him, do you have any idea?
  • Hard to say without knowing the details, e.g. how's the movement handled (move AI, schematics, player controls?), what do you mean by stopped (stopped movement or canceled the attack?), etc.

    Generally, I'd guess that the combatant or game is in a state where movement or using actions is blocked by something. You can check a combatant's states via their game object's inspector, e.g. if they are in action, if their move AI is blocked, 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.