Talk:StendhalRefactoringCreatures: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>StephenIerodiaconou No edit summary |
imported>MiguelAngelBlanchLardin No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 20: | Line 20: | ||
</pre> |
</pre> |
||
---- |
|||
Yes, but something more modular like: |
|||
<pre> |
|||
script Kobol |
|||
behaviour() |
|||
{ |
|||
add(Coward(HP<30%)) |
|||
add(Attack(Player)) |
|||
add(Group(KoboldGroup)) |
|||
add(Patrol(30 meters around)) |
|||
add(NoSpeaker) |
|||
} |
|||
</pre> |
|||
The whole point is to avoid coding as much as possible. |
|||
About using Lua or python or anything like that I prefer to skip it. Java is already a script language, we can do it too with java in the same way we would did with python/lua. |
|||
--[[User:MiguelAngelBlanchLardin|MiguelAngelBlanchLardin]] 01:40, 31 Oct 2005 (PST) |
|||
Latest revision as of 09:40, 31 October 2005
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();
}
Yes, but something more modular like:
script Kobol
behaviour()
{
add(Coward(HP<30%))
add(Attack(Player))
add(Group(KoboldGroup))
add(Patrol(30 meters around))
add(NoSpeaker)
}
The whole point is to avoid coding as much as possible.
About using Lua or python or anything like that I prefer to skip it. Java is already a script language, we can do it too with java in the same way we would did with python/lua. --MiguelAngelBlanchLardin 01:40, 31 Oct 2005 (PST)