Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: origin on May 18, 2010, 09:13:00 am
-
Is there a way to have an enemy ship flee a fight? I have tried several methods and none seem to work properly.
I am trying to have a trigger of something like: hits-left is <50 then run away. I don't want the ship to warp out I want it to flee. If I use evade the ship doesn't acutally leave. If I use go to a waypoint it only goes if I stop shooting at it.
I am basically tying to get an enemy in the thick of battle to run away.
Any ideas?
-
Give it a triggered ai-waypoint order when it's health falls below whatever you want it to.
-
He tried that, but as he said, the enemy will follow his waypoints only if left alone.
I suggest trying No Dynamic Goals in the wing editor. It will likely make them easier targets, but there's no pain in trying.
-
He tried that, but as he said, the enemy will follow his waypoints only if left alone.
I suggest trying No Dynamic Goals in the wing editor. It will likely make them easier targets, but there's no pain in trying.
There isn't any way to toggle dynamic goals in FRED, is there?
Also, maybe instead of a waypoint, you could give them an invisible target a long way away to attack so that they use their afterburners? As far as I know, the AI never uses afterburners when doing waypoints. (BTW, would that be a generally useful feature to have (AI using afterburners for waypoints)? It should be easy to implement, the tougher questions are how to toggle/control that behavior since it probably isn't wanted all the time).
-
Could the AB use be tied to a new SEXP?
-
He tried that, but as he said, the enemy will follow his waypoints only if left alone.
I suggest trying No Dynamic Goals in the wing editor. It will likely make them easier targets, but there's no pain in trying.
There isn't any way to toggle dynamic goals in FRED, is there?
Also, maybe instead of a waypoint, you could give them an invisible target a long way away to attack so that they use their afterburners? As far as I know, the AI never uses afterburners when doing waypoints. (BTW, would that be a generally useful feature to have (AI using afterburners for waypoints)? It should be easy to implement, the tougher questions are how to toggle/control that behavior since it probably isn't wanted all the time).
Thats a good idea - didn't think of that one, Ill give it a try.
-
There isn't any way to toggle dynamic goals in FRED, is there?
Not to my knowledge. I once tried to find that, but not very recently, so the SCP may have implemented it since then.
-
Hot dam it works! thanks sushi.
I put a fighter about 5000 clicks away and checked hidden from sensors
hits left < 50
Ai-chase
And off he goes even if I am chasing him shooting at him - he even does some dodging but stays on course fleeing. ;)
-
When I was on Tolwyns original wing commander mod team I managed to Fred the mission from wing commander 4 where an enemy thunderbolt flees back to its base ship.
And I did it all with retail SEXPs.
-
You could also try the waypoint thing with order priority over 100. Should force the ship to ignore all other goals.
-
Problem is, ships don't use afterburners when following waypoints. The distant attack method is probably your best bet for now, but you may want to have many of these in different directions, so all your fleeing ships don't all go in the same direction. One additional possibility is to try to make the distant targets stealthy as well... otherwise they'll show up as the flashy blips on your radar... though a direct attack order may not work on stealthy ships.
-
It should work, stealth doesn't matter for AI.