I am trying to setup an AI that moves (and hunts enemies) only within a certain range of the spawn position.
In the Move AI I set up in a
Base Settings a Move Range = 4 and
Hunting Settings Hunting Range = 4
but the AI does not continue wandering around (as it does if those 2 options are disabled) within that range and doesn't chase the player if he enters within that range either. When it spawns, it just moves to a spot and waits...
A range of 4 is pretty small, so a large random patrol radius can result in a lot of out of range positions.
Also, what are the enemy detection ranges?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I reduced it to the same value as the Move Range value but:
* eventually the AI stops roaming within that range
* as soon as the player gets detected the AI seems to freeze until the player gets close enough for an attack (but doesn't chase it regardless of the hunting mode)
This is the Enemy Detection
Most likely the battle AI issued an attack on the combatant, i.e. it'll use the move AI to get into range, but at the same time can't due to the move range limitation.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Mode = Waypoint
Use Mode = Hunt
Target Position = (9,12, 0.00, 3.56)*
*these coordinates update every few seconds until the player enters the AI move range. Then the AI stops and then they remain the same.
Target Object = -
I did a test and disabled Use Auto Stop.
My understanding was that the auto stop was temporary until a next waypoint was calculated but seems like it's a permanent stop and the waypoint never re-starts afterwards.
This change prevented the AI to get stuck during the patrol but as soon as the Player enters the scene, it still gets stuck.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!