How to make a character flee from its attacker only
I have an issue with the follower gadget. It requires a tag, but the puppet I am setting up could be attacked by pretty much anything (whether its an enemy, the player, or another "friendly" puppet)
For example, I want to set up a villager who could get attacked by other villagers. But when hit, I want it to only flee from the attacking villager and not from the other ones. Is it something that is possible to do?
-
Is it only 1 villager being attacked at a time?
-
There could be only one or multiple ones. I'm thinking about making it complex
-
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...
-
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....
-
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.
-
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.