Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Bryan See on June 24, 2017, 10:19:36 am
-
Hello,
Lately, in recently-made campaigns using the FRED2 Open campaign editor, there's a persistent error in which players can't advanced even after completing a mission, it says they've failed the mission and can't proceed.
Are there any ways to solve this?
-
Are the failure and win conditions set up correctly?
-
Yes. The failure and win conditions set up correctly in the branch SEXP conditions.
I used the Campaign Editor to create after creating two missions. After I saved the campaign with two linked missions (with the first branch set to the is-previous-event-true SEXP set to the only event), the warning message appeared: "Mission "test1.fs2" last branch isn't set to true."
$Name: Unnamed
$Type: single
$Flags: 0
+Starting Ships: ()
+Starting Weapons: ()
$Mission: test1.fs2
+Flags: 0
+Main Hall:
+Formula: ( cond
(
( is-previous-event-true
"test1.fs2"
"Event name"
)
( next-mission "test2.fs2" )
)
)
+Level: 0
+Position: 0
$Mission: test2.fs2
+Flags: 0
+Main Hall:
+Level: 1
+Position: 0
#End
-
It's literally telling you the problem. The last branch has to always be set to true because FS2 should never encounter a situation where it doesn't know what to do if the earlier conditions are not met.
The most common way to solve this problem is to do what you have done so far and then add another option when true repeat mission. i.e if you don't make that event come true you've failed the mission and have to replay it.
-
It's literally telling you the problem. The last branch has to always be set to true because FS2 should never encounter a situation where it doesn't know what to do if the earlier conditions are not met.
The most common way to solve this problem is to do what you have done so far and then add another option when true repeat mission. i.e if you don't make that event come true you've failed the mission and have to replay it.
But how? Show me the steps
-
+Level: 1
+Position: 2
$Mission: Training-3.fs2
+Flags: 0
+Formula: ( cond
(
( is-previous-goal-true
"Training-3.fs2"
"Complete Training 3"
)
( next-mission "SM1-01.fs2" )
)
( ( true ) ( next-mission "Training-3.fs2" ) )
)
That's what you want. Notice that the mission loops back to the same training mission if not completed.
-
That's why the Campaign Editor doesn't add "( ( true ) ( next-mission "test1.fs2" ) )" before the ) at the end of +Formula: in the .fc2 file in the first place. How does it do that? Or it's just a problem?
I think I get it. The Campaign Editor uses Add Repeat Link to solve this problem.