Skip to main content

Search

How to make a character flee from its attacker only

  • TAPgiles
    Great answers

    Is it only 1 villager being attacked at a time?

  • Pillowbottom

    There could be only one or multiple ones. I'm thinking about making it complex

  • TAPgiles
    Great answers

    Okay. Well, it's going to be tricky honestly.

    If it's just a case of them being shoved back when the attack hits, you could use a force applier on the attacker. But if you want them to properly leg it away from the attacker I'm not sure how I would do it to be honest...

  • UncleM_Games

    Without being an expert, my idea would be to use trigger zones and tags.

    When a villager is attacked, it turns on their trigger zone detecting (attacking).  The attacker turns on an (attacking) tag in themselves when they attack, and there is a follower that flees when (attacking) is detected...

    ???   I'm sure there is more to it.... 

  • TAPgiles
    Great answers

    But if a different attacker is also attacking a different dude at the same time, there are now 2 tags on at once and the follower may target the tag that isn't in the villager that actually attacked.

    Like... you can fairly easily get something that sorta works, and may look fine. But very hard to get something that actually works exactly how they want it, I think.

  • UncleM_Games

    how likely would these separate attacking villagers be close enough to eachother to have their zones overlapping? And the attacker would obviously be closer to who he was attacking, thus would be fled from.  also, if one is attacking another, it still makes perfect sense for others to flee from it.   i also would imagine the attacks would time out at a certain point and wouldnt be endless...

Please sign in to leave a comment.