AI Central



  • There have been a number of posts about the AI features in Cythera, but I think it would be cool if there was a place where everyone could ask questions, post answers and comments. It's open! ;)

    ------------------
    <font color=gold>Bronze: the other gold metal.</font>



  • I wrote a simple AI that I hoped would prevent someone from throwing the mystic spear. Everything seems to work, except for the RunToward() statement. When the character gets to that command he just starts running away from the enemies. He just keeps running, and running, and running...

    If you can help with this, or if you can provide an AI that causes a person to use the Spear as a melee weapon only, it would be greatly appreciated. Here is the code I have:

    NAME "No Throw"

    ; Attack the attacker if he's close enough.
    IF Exists(myself.LastAttacker) THEN
    IF InRange(myself.LastAttacker,2) THEN
    #100 SetTarget(myself.LastAttacker)
    DoAttack()

    ; Or attack any enemy who is close enough.
    IF Exists(enemy.ByRange.Pick) THEN
    IF InRange(enemy.ByRange.Pick,2) THEN
    #100 SetTarget(enemy.ByRange.Pick)
    DoAttack()

    ; At this point, there may be enemies, but they are far away. Walk to them.
    IF Exists(enemy.ByRange.Pick) THEN
    #100 SetTarget(enemy.ByRange.Pick)
    RunToward(enemy.ByRange.Pick, 2)
    DoAttack()

    ; No enemies exist at this point.
    IF True() THEN
    #100 FinishCombat()



  • I don't know the AI scripting language, but I'd reccomend thouroughly investigating your RunToward() statement. Also, I'm bringing this topic back to the top so it will get noticed.

    ------------------
    <font color="gold">Bronze: the other gold metal.</font>


Locked