Author Topic: Issues with Campaign-Persistant Variables  (Read 1717 times)

0 Members and 1 Guest are viewing this topic.

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Issues with Campaign-Persistant Variables
I've been trying to set up several campaign-persistent variables, but I'm having some issues. I create the variable just like any other, and label it as a Campaign variable. Yet I cannot access it in any other missions or in the campaign editor. Am I supposed to "Add Variable" again and simply name it the exact same and give it the same number in the different mission, or is it supposed to show up?
Burning Heaven

 

Offline Axem

  • 211
Re: Issues with Campaign-Persistant Variables
You need to make the variable again in your mission and call it a campaign variable again. FRED can't keep track of which missions are in a "campaign". To FRED, everything is just a single mission.

 

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Re: Issues with Campaign-Persistant Variables
So this is what I have to test the variables across the campaign.

I'm getting an error that "Mission Test.FS2 last branch isn't set to true."

This is what it looks like currently:



How do I go about fixing this error without breaking the current SEXP using the variables?
Burning Heaven

 

Offline Axem

  • 211
Re: Issues with Campaign-Persistant Variables
In the campaign editor, the last branch must always be true. Freespace will look at your mission branches from the top and go down. If it finds a branch that it can pass, the campaign will go to that mission. So making the last branch true basically says "If none of the above then..." Typically the last branch is "repeat mission when true". Basically if none of the pass conditions worked, then we need to repeat the mission.

 

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Re: Issues with Campaign-Persistant Variables
Campaign editor doesn't seem to like variables too much. It actually removes variables that I add to it.
Burning Heaven

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Issues with Campaign-Persistant Variables
You can't use variables in the campaign editor since variables are a mission feature even when campaign persistent. If you added a variable FS2 would have no idea where to take it from.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Issues with Campaign-Persistant Variables
just add an event that triggers at the end of a mission that checks for the value of the variable, and then use is-previous-event-true/false for that.
(´・ω・`)
=============================================================