Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Insomniac34 on August 22, 2009, 02:32:11 pm

Title: Custom Capital Ship Orders
Post by: Insomniac34 on August 22, 2009, 02:32:11 pm
Hey guys, I have a simple question with a most likely complex answer. Here's the senario:

I am making a map where you defend a particular jump node. I want to be able to give orders to an Orion destroyer in game such as "defend node" and "attack [particular ship]". Now, obviously, Attack is a basic command and shouldn't be difficult to implement. However it is not available on the Command menu in game for the Orion. How to I add this?

Now, as for the Defend Node order, I have set up a circular waypoint around the jump node, and I simply want to add an order in the Command Menu that would cause the Orion to follow this waypoint. Is there any way either of these are plausible?

thanks a lot!
Title: Re: Custom Capital Ship Orders
Post by: General Battuta on August 22, 2009, 03:25:55 pm
Yes, rather easily.

What you want to tell FRED is this:

Every time the Orion receives an order to 'guard' something near the node (perhaps use a stationary fighter or an installation, as I believe nav buoys can't be guarded), clear the Orion's orders (via use of the clear-orders SEXP), then add an order for it to follow the waypoint path.

However there are a couple flaws with your system. First off, the attack order sucks with capital ships; it will lead to all sorts of ugly-looking maneuvering. Second, the Orion will always head for the first waypoint in the path every time it's ordered to guard the node.

Nonetheless, the above system should work.