Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: NGTM-1R on September 10, 2006, 06:05:19 pm

Title: Branching and Red-Alert
Post by: NGTM-1R on September 10, 2006, 06:05:19 pm
Relatively simple question: is it possible to set a mission with two branches so that one is a red-alert and the other isn't? I want to be able to set it based on the player's hull strength; if the player's ship isn't damaged much they red-alert to help out somewhere else, if it's low they're recalled to base.
Title: Re: Branching and Red-Alert
Post by: Nuclear1 on September 10, 2006, 07:19:47 pm
The red-alert SEXP says that a mission can only have one branch if a red-alert is involved. If there was a toggle-debriefing flag or the like, it would be possible to use it with end-mission to simulate a Red Alert in one case, but allowing a debriefing in the other case.
Title: Re: Branching and Red-Alert
Post by: Trivial Psychic on September 10, 2006, 09:52:43 pm
I'd say use 2 different possible triggers to end the mission.

Event A - Hull Above XX Percent
when
-and
--(whatever your determination of the time to do the hull strength check is)
--(a check of if the hull strength is above the certain level)
-red-alert

Event B - Hull Below XX Percent
when
-and
--(whatever your determination of the time to do the hull strength check is)
--(a check of if the hull strength is below the certain level)
-do-nothing
<chained>
Event C - Player May Warp
when
-has-departed-delay
--Alpha 1
--0
-do-nothing

If the hull strength is low, then the player will have the option to warp out and back to base for repair/rearm.  Then, the campaign file would branch to two different versions of the following mission, one which would be a Red Alert mission, with the branch tied to if Event A is true.  The second branch may or may not use a briefing and be tied to Event B being true.
Title: Re: Branching and Red-Alert
Post by: Goober5000 on September 10, 2006, 11:31:06 pm
The red-alert SEXP says that a mission can only have one branch if a red-alert is involved.

This may not be the case.  IIRC Lightning Marshall 3 used branching red-alert in the last mission.
Title: Re: Branching and Red-Alert
Post by: Colonol Dekker on September 11, 2006, 11:15:15 am
Use the campaign editor SEXPS, and call the red-alert coming into play to activate a branch change.   :sigh: