Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: starbug on February 04, 2007, 03:40:16 pm

Title: Requesting advice for capship turning
Post by: starbug on February 04, 2007, 03:40:16 pm
i am having problems with a mission i am doing for my TBP campaign and the problem is a Warlock destroyer is getting attacked from behind by 3 raider battlewagons so what i want to do is have the warlock turn round and face the first battlewagon so i can fire its forward beams simple enough, i have created a waypoint path so that the ship slowly turns round making it bit more realistic, but for some reason when the ship gets to the first waypoint in the path the nose raises up and the ship goes upside down and does the rest of the waypoints upside down and even when it is finished it still isn't pointing to the enemy ship despite the waypoints are leading to right in front of it. At first i thought i might have the waypoints to close together  so i increased the gap, still no difference, so i then tried using just in waypoint near the enemy ship still get the same problem, i just can't get the warlock to face the battlewagon without doing some crazy barrel roll. I have also used the change facing object sexp with no luck it just spins round and doesn't face the chosen ship. So dose any have any tips or advice, i am using the FRED 3.6.9 build.
Title: Re: Requesting advice for capship turning
Post by: Shade on February 04, 2007, 04:05:16 pm
I can't believe I'm saying this, but... try ai-chase. It might do the trick if there's enough distance between the two ships. Let it run until the ship has turned to approximately face the target and then use clear-goals to prevent it from doing something stupid later on.

[disclaimer] No, I'm not recommending using ai-chase for capship combat. Doing that is a recipe for frustration.
Title: Re: Requesting advice for capship turning
Post by: FUBAR-BDHR on February 04, 2007, 04:26:11 pm
What are the ships orders?  Is it just set to do the waypoints or waypoints and attack?  You may need to have it get it to the waypoint where it is facing the right direction before ordering it to attack.   Try making a test mission with just the ship doing the waypoints and see if that works.
Title: Re: Requesting advice for capship turning
Post by: Trivial Psychic on February 04, 2007, 04:26:48 pm
Another option would be to put a single waypoint behind attacking battlewagons.  Tell it to fly to that waypoint, then clear goals after its come about.  Obviously, you'd need to find out how much time it takes for such an about turn to take place, so you know when to clear the goals.  You may also need to chose cap-waypoint-speed if it comes about too quickly.  Naturally, such a change would change the rotation time.  Unfortunately, none of these can guarantee that the Warlock won't change its orientation during turn and come out on it side, but it should be facing the correct direction.
Title: Re: Requesting advice for capship turning
Post by: starbug on February 04, 2007, 05:09:41 pm
cheers i'll give them a try tomorrow to tired now, but for those asking the ship has no orders, it just jumps into the area, about 1 minute the battlewagons jumpin behind and thats when the warlock is supposed to turn round with the waypoint-once sexp.
Title: Re: Requesting advice for capship turning
Post by: starbug on February 05, 2007, 03:01:07 pm
I got it working, turns out it was the speed of the destroyer, i slowed in down to 10 instead of its normal 50 and that seems to done the trick, cheers Trivial Psychic  for that suggestion.