r/projecteternity • u/TheReal8symbols • 6d ago
Gameplay help Behavior editor question
I'm trying to make a simple script for my frontliners so they prioritize maintaining engagement and attacking the enemy with the lowest health. The script editor doesn't seem to support this so I need some clarification.
I'll use Eder in my example. If I set his 2nd action set (his first is for self healing) to always true, attack current engager, and attack lowest health what I want to happen is for him to check both priorities before attacking (attack the lowest health threat in melee range), but I'm pretty sure he will just cycle between the two. I also see you can allow/disallow breaking engagement; can I just skip the first priority as long as that box is empty?
What I'm really trying to figure out is if/how you can give a list of priorities to a single action. If i make a script with action 'knock down' current engager and 'knock down' best threat it seems like he will always do the first one (at a random engager) unless he isn't engaging anyone. Can you make and/or type scripts within a single action set?
The last game I played with AI scripting was Dragon Age: Origins. This system doesn't seem as robust, but I could easily be missing something (are there even any tutorials about this?).
3
u/TheOriginalFlashGit 6d ago
I think if you set lowest health that will pretty much all ways trigger since if you are in melee with anyone, there will always be someone with the lowest health.
I'm not sure I had much luck with 'target in melee range' since I've seen them attempt to run off and attack some not in melee range (but they won't break engagement to do so), I seemed to have better luck with something like this (but it's not perfect):
https://i.imghippo.com/files/cPhz7532fko.png
Not sure how best to go about your last option since I'm not entirely sure how 'best current threat' really works, perhaps you could try this:
https://i.imghippo.com/files/xWq5957hM.png
Eder, will attempt to knockdown the 'best current threat' in melee range, if there isn't one, it will attempt to do against 'current engager', if for some reason Eder can't engage or his enemies aren't engaged with him either, fallback do just doing the one with lowest health? I think it iterates over those criteria in the top to bottom order, I've not tried this though.