PredeterminedMoveTowardsLocation property

It's a property, not a serialized field. Right now it can only be set via code. The reason for this is that the property is a single object but the MoveTowardsLocation returns an array so it's easiest to set via code to reduce confusion.
 
re:"Right now it can only be set via code".. where in the code can I set this. I tried searching the entire solution but I can't seem to find anything.
 
It's on the cover ability. You can set it by doing something like:

Code:
var cover = ultimateCharacterLocomotion.GetAbility<Cover>();
cover.PredeterminedMoveTowardsLocation = yourLocation;
 
and... "yourLocation" refers to what exactly? The location of the cover object or the location of the enemy object?
 
I see this issue in Visual Studio, however, it compiles in Unity but shows an issue in Visual Studio 2019 Professional 16.9.3

1618070166406.png
 
So, I seem to be back to square one here. I've tried the code snipped you posted but still no luck. I have a very small simple scene setup, two cover points, but the AI just ignores the cover positions no matter what I seem to try.

Will the AI use cover positions during combat phase?
 
The PredeterminedMoveTowardsLocation should point to the Transform that the MoveTowardsLocation component has been added to. The StartCover task uses this to tell the AI agent what cover position to take.

Code:
            m_Cover.PredeterminedMoveTowardsLocation = m_CoverPoint.Value.MoveTowardsLocation;
 
Here's what I've been playing with, no luck.


public class DeleteThis : MonoBehaviour
{
public UltimateCharacterLocomotion ultimateCharacterLocomotion;
public MoveTowardsLocation MoveToLocation;

void Start()
{
Cover cover = ultimateCharacterLocomotion.GetAbility<Cover>();
cover.PredeterminedMoveTowardsLocation = MoveToLocation;
}
}
 
also, once I get this working what is the best way to keep AI actors in a certain area dedicated to seeking cover and fighting from cover?

I'm trying to get that same feeling from playing AI like in Gears of War, I'm sure Opsive AI can handle this, just looking for "best practices" or best known solutions for this kind of behavior
 
1619617947333.png

I find this an odd part of the code.

The m_DetectedObject seems to be generic items that do NOT have MoveTowardsLocation associated with them.

Debugging this I notice that it can return projectiles, blank primitives, etc all items that do not have any MoveTowardsLocation scripts attached?
 
Top