Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: eliex on January 15, 2010, 03:29:53 pm
-
Hello all,
For an undercover campaign, the pilot is allowed a choice between 3 different fighters, e.g a Myrmidon, Herc II and a Perseus but will have to keep that specified fighter for the rest of the campaign.
The trouble is a "disallowing" SEXP is non-existant I believe, so although in-mission I can successfully identify what class of fighter the player is flying I can't make the only choice of fighter the fighter the player uses in the first mission.
I tried a hack:
(http://img695.imageshack.us/img695/8519/fredpic01.png) (http://img695.imageshack.us/i/fredpic01.png/)
Here I have identified what fighter the player has chosen and recorded it in a variable.
(http://img97.imageshack.us/img97/348/fredpic02.png) (http://img97.imageshack.us/i/fredpic02.png/)
In the campaign editor, I have not allowed any type of ship to be always available initially at the start of the campaign but made the Myrm, Herc II and Perseus available in the first mission's Team Loadout. So depending on the choice, the allow-ship SEXP will always allow the specified fighter to be always available until the end of the campaign and no other.
Alpha 1 in the second mission of the campaign is flies a default Ulysses in-FRED depending on the ship-allowance changes to remove it.
Unfortunately, this seems to cause problems which include only the Myrm available in the ship selection, no weapons and no effect in the next mission. Any ideas?
-
campaign persistent variables combined with 3 sets of missions one set with each fighter but that could cause a nightmare with bug fixing
-
You can use campaign-persistant variables to set the amount of ships available in each mission. Just check what ship the player is flaying in the first one, and set the amount of allowed ships in the loadout to zero for all other ships.
-
That's sounds promising. Do you know which sexp creates that effect?
Also, when FREDding future missions with Alpha 1 set by default as "GTF Ulysses" as a placeholder, will the mission remove the option of flying the Ulysses and replace the fighter with the one the player selects in Mission 1?
-
Okay, first you create three variables. Each of these should be campaign-persistant, and hold an initial value of 1.
Then go to the loadout editor, and set the amount of ships available to use the variables.
Then create an event in the first mission that checks the ship type the player is flying, and adjust the other two variables accordingly.
Check the attached mission for details.
In the subsequent missions, just set the loadout up in the same way.
[attachment deleted by admin]
-
Someone's using my advanced team loadout!
*Kara does the happy dance*
-
THAT explains why on the 3.6.10 final FRED I didn't understand how the solution worked. Maybe I should update my FRED builds more often. :P
Okay, I think I understand the concept. So in the mission provided, the Ulysses is a valid choice for ship selection, but if the default choice was, perhaps the Myrmidon the variable system won't have to be changed.
Thanks for your help The E. :D
-
http://www.hard-light.net/wiki/index.php/Improved_Team_Loadout
That might help. It's a little old and the deal-with-ship-loadout has been removed while the Alternate Ship Classes Editor has been greatly improved but that should help you grasp the concepts involved if you haven't already. :)
-
Thanks, I have a read into that.