Difference between revisions of "Persistent Variables"
Goober5000 (talk | contribs) m (Persistant Variables moved to Persistent Variables: spelling) |
(Brought into line with goober's spelling to avoid persecution) |
||
Line 1: | Line 1: | ||
− | Variables have been a part of FRED since the Retail version, but are limited by only being available in the mission where they are defined. | + | Variables have been a part of FRED since the Retail version, but are limited by only being available in the mission where they are defined. Persistent variables differ in this, as they are stored for later use instead of being lost for good when the mission ends. This allows mission designers to carry over specific information between missions and even campaigns. |
− | There are two types of | + | There are two types of persistent variables: |
− | ===Player- | + | ===Player-persistent=== |
− | This type of | + | This type of persistent variable is stored in the pilot file. Further, they are stored immediately when they are created/changed from within a mission. This means that any change is going to be there regardless of the later outcome of the mission. Player-persistent variables can be accessed and changed from any campaign played with the same pilot. |
− | ===Campaign- | + | ===Campaign-persistent=== |
− | These | + | These persistent variables are stored in the campaign file, and are only stored when a campaign progresses to a new mission. So if the player is killed or quits during a mission, and changes made to a campaign-persistent variable are not stored. |
[[Category:FRED]] | [[Category:FRED]] |
Revision as of 11:07, 7 May 2006
Variables have been a part of FRED since the Retail version, but are limited by only being available in the mission where they are defined. Persistent variables differ in this, as they are stored for later use instead of being lost for good when the mission ends. This allows mission designers to carry over specific information between missions and even campaigns.
There are two types of persistent variables:
Player-persistent
This type of persistent variable is stored in the pilot file. Further, they are stored immediately when they are created/changed from within a mission. This means that any change is going to be there regardless of the later outcome of the mission. Player-persistent variables can be accessed and changed from any campaign played with the same pilot.
Campaign-persistent
These persistent variables are stored in the campaign file, and are only stored when a campaign progresses to a new mission. So if the player is killed or quits during a mission, and changes made to a campaign-persistent variable are not stored.