My enemy never gets to SuspicionBehaviour();

Once enemy gets Aggravated it is ALWAYS aggravated.

Any ideas?

The code debug.log I have in ActionScheduler is NEVER called?

Don’t know what code to put here?

Guess like many of these videos I can live with the errors. Feels weak and fragile for sure tho.

Thanks in advance for any GUESS’s as to why my enemy never gets suspicions or put another way never leaves the Aggrevated state.

I am bothered by the fact that i do NOT have control of state… of the enemy.

Sorry just frustrated.

Please give me any guess as to why thanks

Hi Steve.
Post your AIController script here (format it with the </> button) and I’ll take a look at it. (I don’t have enough information from the post to guess yet).

        private bool IsAggrevated()
        {
            float distanceToPlayer = Vector3.Distance(player.transform.position, transform.position);
            return distanceToPlayer < chaseDistance;
        }

This was always returning true…

after I restarted Unity, it still always returned true.
After rebooting my machine it finally started returning as it should.

Very frustrating when i am unable to put my finger on WHY ? because I knew I was out running the enemy.

Another question…
Seems we have more than one place to control character speed,
Here is where i see speed.
Mover script.
NavMeshAgent…
— and I am still confused about the max speed from the animation.
Where should I control the speed from?
and
Why is it in more than one place?

Thanks for your help Brain

I feel having a BaseClass script for character is great, but in the hierarchy why there?
seems to feel better if I had a Player prefab
and a prefab for each type of character i want all using the BaseClass but not prefabs?
adding that extra layer of prefabs is simply UNneccessary. (my opinion)
What are your thoughts?

Thanks

These things all work together.
The speed in the animator drives the animation. It is derived from a calculation in Mover based on the current velocity returned by the NavMeshAgent.

The NavMeshAgent gets it’s maximum speed from the Mover (we may not be quite there yet, this is set where we adjust the speed based on whether the character is fighting or suspicous).

The Mover decides how fast that maximum speed will be bawed on the input in MoveTo() or StartMoveAction() (this is the part that we may not be quite at yet).

These things all work together, and really can’t all be in one place (we have no way of editing the source of NavMeshAgent or Animator, and it’s all part of having a modular approach).

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms