ORK Framework is great for my project.
But there is a problem I do not know the cause.

I want the player to patrol around the base position.
Like the kingdom rush's melee tower.

enemy comes to the player, and attacks.
The player is also good attacking enemy.

But the player does not change the position.
player must patrol as enemy, and come up to the target enemy.
Because the enemy and the player using the same move ai.
Player's 'ai controlled player' was enabled.
(and they are use the same character prefab.)

Can player patrol around the base position?
What I have anything wrong?
  • The player combatant (i.e. leader of the player group) is never controlled by the move AI.
    You could either move the player using game events, or use a 'hidden' player that's not taking part in combat, so that the combatants fighting will all use the move AI.
    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!
  • Thank you GiL.
    I am happy now. ha ha.

    I used a hidden player way.
    (I don't know the game evant.)

    It's great! Now my player can move.
    But I have a question.

    I set the enemy detection range to 5.
    Then the player will start to move when close an enemy within 5 unit. Am i right?

    However, the player has to move immediately when the enemy is spawned.
    the enemy spawn point is far about 20 unit.

    player has moved 5 unit in the direction of the enemy, and waited there till the enemy's attack.

    Does player can ignore the faraway enemy?
  • Combatants will move to enemies if they're detected and hunting is enabled (Hunting Settings in the move AI).

    I.e. if you want your player to move to an enemy spawning far away, you'll have to increase the detection range and also set the detection angle to be 360, so that it'll detect all enemies around it, not just in front of it (i.e. the default 90°).
    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!
  • Thank you!

    Detection range and detection angle works fine.
    But i want it works only within the detection range.

    I.e. The enemy enters into the detection range, then it combatants to detect the enemy.
    Now combatants will move to the enemy.
    And attack each other.

    But the enemy spawn outside the range and combatants move immediately to the enemy.
    combatants must detect the enemy within range. Right?

    But combatants had already detected the enemy before coming into the detection range.
  • A little weird.

    Now I had to uncheck all of the options on the move AIs.
    But the combatants move and attack is the same as before.
    So I think that the behavior of combatants occurred in the base attack ability.
    Is that correct?

    All I want is the following:
    The combatants is in the idle state,
    Go to the enemy within 5 unit,
    Attack the enemy,
    Come back to spawn position.

    What should I do?
  • That's most likely coming from your battle AI, not the move AI. If you don't have use ranges for your actions (e.g. the base attack ability), it'll also use far away targets and move toward it.

    You need to set up use ranges, as well as take a look at battle and AI ranges in the battle settings.
    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!
  • I Fixed base attack ability, as you've been advised.
    finally! The player moves well.
    Thank you very much.

    But it's not perfect.
    Perhaps I did not use the battle spot.
    So combatants do not go back to the user base.

    I used runToBase battle event of the tutorial.
    It works fine in turn based battle.

    Without a battle spot Can I send combatants to the user base?
    Or something else is wrong?
  • What battle system type are you using, and if real time, are you using the Real Time Battle Area component?
    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!
  • Yes. Real Time Battle Area (whole scene) was added.
  • In that case, there'll be no battle spots - they're only used in arena battles (using the Battle component).
    If you want to remember and return to the last position of a combatant, you could store it in a Vector3 game variable (e.g. using an Object variable to store it on the combatant's game object).
    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 May 2016
    Object variable is very useful.
    Now the combatants are to return to spawn position.
    Thank you very much.

    However, combatants are run to target, attack once, run to base ...
    This will repeat until the target is dead.
    Combatants must go to spawn position only when no enemies.

    Can I tell the combatants when there is no enemy?
    (Using the event and battle AI ...)

    Only when there is no target combatants can go to spawn position.
    Is this possible? This is required for the leader of player group in the real time battle.
    Post edited by HellerKitty on
  • Yes, that's possible in the event system.

    E.g. use a Search Combatants step to store non-dead enemy combatants of the player in a found/global objects list. Afterwards use a Found Objects Count step to count the number of game objects in the list - if it's 0, there where no combatants around.
    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 May 2016
    I do not know how to use these events.
    Here is my screenshot.

    image

    How do I set the search combatants?
    I can not find the tutorial or explanation. Please help me.
    Post edited by HellerKitty on
  • Looks good to me - you may want to set Is Dead to No to only check for alive enemies.
    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 May 2016
    I have set all the options, but failed.
    I tried several times, but there is no change.

    Why does not the player using the move ai?
    Game events are too difficult for me.
    And I do not even know how to exceptions hidden player in the battle.

    It would really needed me.

    Do you have any other way?
    Or do you have a reference manual for all event step?
    Maybe I have set incorrectly Search Combatants step.

    I am considering a few things because it takes too long to solve the problem.

    Use Turn battle or active time batte.
    Use arena battle scene with battle spot.
    Post edited by HellerKitty on
Sign In or Register to comment.