Changes

Jump to navigation Jump to search
1,029 bytes added ,  11:54, 12 June 2020
Line 306: Line 306:     
Finally, all SoftwareProduct's have their own local variables that you can read and write to for your scripts, just use '''Product.GetVar(VariableName, DefaultValue)''' and '''Product.PutVar(VariableName, Value)'''.
 
Finally, all SoftwareProduct's have their own local variables that you can read and write to for your scripts, just use '''Product.GetVar(VariableName, DefaultValue)''' and '''Product.PutVar(VariableName, Value)'''.
 +
 +
==== Scope variables ====
 +
These are the variables each scope has access to. Note that you should use the '''LIST_SCOPE_MEMBERS''' console command, as described above, to get details.
 +
<u>'''All scopes'''</u>
 +
*SDateTime '''Now''' (Current in-game time)
 +
*int '''DaysPerMonth'''
 +
*Company '''PlayerCompany'''
 +
*MarketSimulation '''MarketSimulation'''
 +
 +
<u>'''DevScope'''</u>
 +
*WorkItem '''WorkItem'''
 +
*bool '''Ended''', '''Cancelled''' (these will be true if the event was triggered by the workitem being ended or cancelled, otherwise it was triggered by being created)
 +
 +
<u>'''SaleScope'''</u>
 +
*SDateTime '''Time''' (Same as Now)
 +
*SoftwareProduct '''Product'''
 +
*int '''PhysicalSales''', '''DigitalSales''', '''Refunds''' (These can be changed to alter the result of the current day's market simulation)
 +
 +
<u>'''ProductScope'''</u>
 +
*SoftwareProduct '''Product'''
 +
*SDateTime '''Time''' (Release date)
 +
 +
<u>'''CopyScope'''</u>
 +
*SoftwareProduct '''Product'''
 +
*uint '''NewCopies''' (How many new copies were added to stock, this is read-only)
    
==== Script example ====
 
==== Script example ====

Navigation menu