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?
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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?
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°).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
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?
You need to set up use ranges, as well as take a look at battle and AI ranges in the battle settings.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Here is my screenshot.
How do I set the search combatants?
I can not find the tutorial or explanation. Please help me.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.