Sometimes you may want an NPC to perform a certain task in the game. You could try to tweak the character’s personality so that it would be naturally inclined to do these tasks. But it’s probably a better idea to just tell it to do something.
You don’t want the character to be fully scripted, of course. After it has performed its task, the character can go back to autonomously choosing opportunities from the environment. Until the conditions for performing the task appear again.
This basically means that a character can be switched between autonomous and controlled states. The controlled state is when the character performs tasks for the game. One of these tasks might be allowing the player to control the character as an avatar, perhaps. Or scripted behaviours which can be simple (go to a certain location) or complex (follow a character while hiding behind trees and run away when a monster comes near).
The latter might approach certain forms of game AI, so you might end up switching between one type of AI and another. 😕
Posted on June 25, 2006 at 2:31 pm
I’ve been thinking about similar setups myself, for previous projects.
I would certainly recommend having different character control states:
0 – Static (no calculations)
1 – Player controlled
2 – System controlled (plot / pre-anim)
3 – Autonomous (“AI”)
Posted on July 8, 2006 at 9:40 am
[…] In Characters with jobs, I proposed the idea of a hard switch between the character’s “ambient AI” behaviour and a form of very controlled goal-oriented, more or less scripted behaviour when you want the character to perform a certain task. This may remain a suitable solution for forcing the character to behave in a certain way exactly (in a cut scene e.g.). But it is too strict and demands too much control from above to be suitable for general use. […]