Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: foolfromhell on July 25, 2007, 04:03:01 pm

Title: How to keep enemies from attacking you, but still show up as enemies?
Post by: foolfromhell on July 25, 2007, 04:03:01 pm
I'm making a mission where the NTF has blockaded a remote GTI Facility, and the GTVI need to get Erinyes prototypes past the blockade into GTVA space.
Was hoping to dock the Prototype Erinyes to an NTF Fenris while the Fenris travels to the Jump Node and is ambushed by GTVA Forces.

Unfortunately, if I keep the Erinyes as the same team as the NTF, the GTVA forces destroy it. If I keep the Erinyes as part of the GTVA forces, the NTF forces destroy it.

So, I have two questions.
How to #1 change the allegiance of the Erinyes based on when the Fenris is disabled and not based on X seconds since beginning.
And, how to change the allegiance of yourself too, since the GTVA attacks me too.
I thought of keeping the Erinyes and myself as allied to GTVA, but give the NTF forces orders to ignore me... Will that work?

Also, the Erinyes automatically undocks unless I disable its Engines. But if I do that, the Erinyes cant escape to safety in time.

Edit:
What I am mainly asking for is to initiate commands, like Dock and Undock based on triggers, such as the destruction of a ship or so instead of specifying how many seconds after the beginning.

Thanks.
Title: Re: How to keep enemies from attacking you, but still show up as enemies?
Post by: TrashMan on July 25, 2007, 05:28:33 pm
Just set a "Protect ship" checkbox for hte Erynies (Misc options for hte ship) NO ONE will attack it as long as that flag is set...you can later remove it via a SEXP.


AS for the changing of IFF..you do the following..

WHEN
+ Has-Undocked
--- Eryines
---- Fenris
---- 1
+change-IFF
---ship1
---ship2
---shipN
---Hostile (or friendly)
Title: Re: How to keep enemies from attacking you, but still show up as enemies?
Post by: TrashMan on July 25, 2007, 05:33:31 pm
Another thing to keep in mind is to control the Eryines..have it start docked with the Fenris, set it's initial speed to 0...you might even want to give it the PLAY DEAD orders..to do nothing..

Then you can use the AI goals SEXP to first clear any goals it has and then give it the undock goal, followed by the departure one.
Title: Re: How to keep enemies from attacking you, but still show up as enemies?
Post by: foolfromhell on July 25, 2007, 06:06:10 pm
How do I trigger a Sexps to happen when something blows up or something?
Is there a guide to the Sexps?
Title: Re: How to keep enemies from attacking you, but still show up as enemies?
Post by: haloboy100 on July 25, 2007, 06:21:31 pm
How do I trigger a Sexps to happen when something blows up or something?

Use the "is-destroyed-delay" SEXP.

Is there a guide to the Sexps?

Yeah. Read the FRED 2 help topics.
Title: Re: How to keep enemies from attacking you, but still show up as enemies?
Post by: TrashMan on July 25, 2007, 06:22:30 pm
Try the Freespace Wiki (top of the page)

but basicly, all SEXP's are self-explanatory in msot cases...when you set up one SEXP a more detailed explanation of what each field does will be written in the events editor (bottom)
Title: Re: How to keep enemies from attacking you, but still show up as enemies?
Post by: Ghostavo on July 25, 2007, 07:55:34 pm
foolfromhell, you might find the walkthrough helpful. It helps get a feel of how to use basic sexp, and other useful things.