Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Axem on November 11, 2005, 05:08:14 pm
-
I'd say the campaign editor, but I'm trying things that require me to hack into the fc2 file in a text editor.
I'm trying to make a campaign with a randomly placed mission that can occur after the first mission, and after the random mission you keep on going with the campaign.
What I've done so far is make a campaign persistant variable that's set right away in the first mission. The variable is set from 1 to 4, that number is which mission is happens after. The final mission goes to it no matter what.
While it let me, I had the campaign editor set up another campaign persistant variable that had the exact same name. If the winning condition was set, and the variable was the right number, go to the random mission, if the winning condition was set and the variable wasn't the right number, go on to the next mission.
Now after that mission takes place, you're supposed to go back to the linear advancement. Which I had to hack into the fc2 file to do. (Can't place a mission more than once and the editor won't let you go up mission levels).
But none of this works. I set up a message telling me what number was chosen, but it never appeared in the right spot.
Ideas?
If I can get this working you all get a super fun campaign tomorrow!
-
Personally I'd just make 4 copies of the mission which differed by only one letter and place it as a branch after each of the missionss. You can easily link back from it to the mission that follows on that way.
If the persistent variable in the campaign editor isn't working it could simply be a bug. Try having an event in each mission that checks what the value of the variable is and use that to decide which branch to use. If that works mantis the bug :)
-
I like the second idea. It prevents me from making sure all 4 missions are in sync with each other.
Now, how do I check the campaign persistant variable in another mission? Just give it the same name, same settings?
-
Yep. If you create a PV with the same name as one used earlier in the campaign FS2 assumes they are one and the same. :)
-
It looks like it worked. I randomly go into the mission, but I can't advance past it. :(
I thought I buggered up the syntax in the fc2 file so I made a dummy campaign with the correct advancement conditions and even that didn't work.
Do I need to restart the campaign to affect changes?
Would messing around with the Level and Position fields do anything?
-
I suggest heading over to sectorgame and taking a look at Goobers FreespaceLancer (http://www.sectorgame.com/forums/viewtopic.php?t=1438) test.
-
Ah found the problem. It'd probably help if the event actually ever fired. Stupid me.
So, mini-campaign release in a few hours. Yay.
-
Hooray! Another Axem campaign! :D