Talk:StendhalRefactoringCreatures

From Arianne
Revision as of 09:15, 31 October 2005 by imported>StephenIerodiaconou
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

For AI:

You could do something like a simple scripting language, e.g. in Baldurs Gate they use LUA i think, and then create AI defs in there. As you say you could have a set of standard modules of behaviour that you could call in each script.

e.g.

script Kobol

behaviour()
{
     if player within 10meters 
          Follow(player);  <- premade module
     if player within 3 meters
          Attack_If_Not_Injured(hitpoints); <- another module
     else
          Roam_For_Food();
}