Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggression Modes: only attack if attacked #47

Open
jpw1991 opened this issue Jan 2, 2024 · 0 comments
Open

Aggression Modes: only attack if attacked #47

jpw1991 opened this issue Jan 2, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jpw1991
Copy link
Owner

jpw1991 commented Jan 2, 2024

Aggression Modes

Right now guards just run off attacking everything - chasing deer, etc. It would be nice if there was a way to control minion behaviour so they respond differently to threats.

Example modes:

  1. Aggressive - Current behaviour - minions engage everything they see.
  2. Guard - Minions only engage after being attacked.
  3. Pacifist - Minions ignore all attacks.

Technical Implementation

Aggressive

No change - default behaviour.

Pacifist

Maybe in the creature's Update method, keep setting the target to null.

Guard

Similar to pacifist mode. Upon receiving damage, find the first nearest enemy and target it. Return it to pacifist mode after enemy is dealt with or out of range.

@jpw1991 jpw1991 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant