Author Topic: Events that carry across a campaign  (Read 2029 times)

0 Members and 1 Guest are viewing this topic.

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Events that carry across a campaign
I'm aware that events that occur in a campaign can branch to different levels, but I was wondering if events can branch WITHIN multiple levels.

Ex. In Mission 1 I have an opportunity to save Beta wing. If I save Beta wing, the wing will appear in corresponding levels. Otherwise I can just have them set to never arrive.

Is such a thing possible? Sorry if it's already been discussed, I already ran a few searches through the forum and looked through various event conditions but couldn't find anything myself.
Burning Heaven

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Events that carry across a campaign
That's definitely possible by using campaign persistent variables.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Re: Events that carry across a campaign
Aha! *dives in to wiki and testing*

Just figured out how to log that variable. My only question is how do I call or pull in the information for said variable?

I'm assuming I have to do a check for if the value I assigned the variable is = to the value I want, using "variable-array-get" it then does whatever actions I want. Correct?
Burning Heaven

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Events that carry across a campaign
Cake.

I assume by 'log' you mean you figured out how to create a variable. (right click > create variable) For the purpose of this example we'll name the variable 'BetaStatus' and it will be an integer (as opposed to a string). It's initial value should be 0. Make sure it is campaign persistent.

Mission A:

When
  • is-destroyed-delay
    • Beta
    • 0
  • modify-variable
    • BetaStatus (right click > replace variable)
    • 1

This will set it up so that if Beta is destroyed, BetaStatus will be set to 1, otherwise it is 0.

Mission B:

When
  • (Logical)=
    • BetaStatus
    • 0
  • OTHER EVENTS

Note: You'll need to "create" the campaign persistent variable in each mission as you FRED, but if it has the same name, FSO will figure it out. For Mission B, the argument could be in the arrival cue for Beta wing.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Events that carry across a campaign
or you could use is-previous-event-true/false :P
(´・ω・`)
=============================================================

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Events that carry across a campaign
I guess I'm just partial to variables.. I feel like they have a little more freedom.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Events that carry across a campaign
That they do, but for passing a boolean true/false, you might as well use previous-even-true and save yourself a variable slot.
That is, if you plan on using 99 variables in a single mission XD
(´・ω・`)
=============================================================

 

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Re: Events that carry across a campaign
Mission A:

When
  • is-destroyed-delay
    • Beta
    • 0
  • modify-variable
    • BetaStatus (right click > replace variable)
    • 1

It should be pointed out that when you choose modify-variable, this is through Replace Operator \ Change \ modify-variable. Choosing modify-variable  from the first drop-down will modify the variable as a whole, not just as a result.

EDIT: Also just found that you can also use this to make briefings that refer to events that could have occurred in previous missions. Woot!
« Last Edit: August 03, 2011, 05:25:10 pm by LoneKnight »
Burning Heaven

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Events that carry across a campaign
Sorry.. I wrote all that from memory..

But yes, variables are TEH WIN. Get comfortable with them and you can do amazing things.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Scotty

  • 1.21 gigawatts!
  • 211
  • Guns, guns, guns.
Re: Events that carry across a campaign
In this case, is-previous-event-true/false is a much simpler solution.  You don't have to modify any variables, and the value is unimportant.  For booleans, if you can do it without variables, do it without variables.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Events that carry across a campaign
Suppose so.. of course with the variable and a complicated event you could record how many survived too. If you wanted to get REAL crazy you could record hull percentages in more variables..
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

  

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Events that carry across a campaign
I should note that nightly builds have increased the number of available variable slots to 250.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns