Custom AI issue

Discussion in 'Support' started by FCRev, Aug 5, 2018.

  1. FCRev

    FCRev New Member

    Joined:
    Aug 4, 2018
    Messages:
    4
    Likes Received:
    0
    Hello!

    I've been working on adding a survivor, that flees from zombies, and calls out for help periodically.

    I've got everything working other than the AI that makes the survivor flee from zombies.

    Code:
     
      AITargetSelectors:
        - 0 clear
        - 1 attacker
      AIGoalSelectors:
        - 0 clear
        - 1 avoidzombies
        - 2 meleeattack
        - 3 randomstroll
        - 4 lookatplayers
    So from what I understand:
    - 0 clear (just clears old vanilla AI)
    - 1 avoidzombies (should avoid zombies, similar to how creepers avoid cats)
    - 2 meleeattack (attacks any mobs that attack first)
    - 3 randomstroll (walks around randomly)
    - 4 lookatplayers (looks at players nearby)

    My only issue is that avoidzombies just isn't working. He just stands there when being approached by zombies, then attacks them after being hit first.
    Any ideas?
     
    #1
  2. Omanoctoa

    Omanoctoa Active Member
    Supporter Premium Supporter

    Joined:
    Mar 10, 2016
    Messages:
    407
    Likes Received:
    36
    You could always set up an onTimer skill that checks to see if there are any Zombies nearby and runs to random coordinates nearby if there is... Though potentially this would run the Survivor into the zombies...at least it's a start :D
     
    #2

Share This Page