Difference between revisions of "Mission variable"

From Elite Wiki
m (Mission variables moved to Mission variable)
(Categorised and respaced)
Line 9: Line 9:
 
  mission_fredJamesMission_counter1
 
  mission_fredJamesMission_counter1
 
  // might be set to a number that's incremented or decremented every so often
 
  // might be set to a number that's incremented or decremented every so often
 +
 
  mission_trumbles_decisionKey
 
  mission_trumbles_decisionKey
 
  // could be the result of a missionChoice
 
  // could be the result of a missionChoice
 +
 
  mission_moonShot_stage
 
  mission_moonShot_stage
 
  // could be a phrase describing the current scripted action eg. BEGINNING_MISSION or KILLING_ALIENS or MISSION_COMPLETE
 
  // could be a phrase describing the current scripted action eg. BEGINNING_MISSION or KILLING_ALIENS or MISSION_COMPLETE
Line 17: Line 19:
  
 
  mission_counter
 
  mission_counter
 +
 
  mission_variable
 
  mission_variable
 
  // no mission identifier
 
  // no mission identifier
 +
 
  mission_mymissionisaverycomplexaffairthatImightmisspell_andthisisanequallycomplexvariable
 
  mission_mymissionisaverycomplexaffairthatImightmisspell_andthisisanequallycomplexvariable
 
  // could be easily misspelt or misunderstood
 
  // could be easily misspelt or misunderstood
 +
 +
 +
[[Category:OXP_howto]]
 +
[[Category:Oolite]]

Revision as of 16:41, 21 January 2006

Mission variables are states that can be set and queried by a script in scripts.plist

They should have a unique name that is always prefixed by mission_. A good naming scheme is to use mission_ followed by a unique identifier for your script (for example, fredJamesMission1 followed by an underscore then the use to which the variable is being put (for example, _counter1 or _EnemyName.

Mission variables are saved in the player's saved game file.

Good Examples of Mission Variable Names

mission_fredJamesMission_counter1
// might be set to a number that's incremented or decremented every so often

mission_trumbles_decisionKey
// could be the result of a missionChoice

mission_moonShot_stage
// could be a phrase describing the current scripted action eg. BEGINNING_MISSION or KILLING_ALIENS or MISSION_COMPLETE

Poor Examples of Mission Variable Names

mission_counter

mission_variable
// no mission identifier

mission_mymissionisaverycomplexaffairthatImightmisspell_andthisisanequallycomplexvariable
// could be easily misspelt or misunderstood