Changes

Jump to navigation Jump to search
209 bytes added ,  17:24, 30 October 2023
Line 351: Line 351:  
* '''Host''', which means the script will only run on the current hosting player's computer. Example: You are only calling methods which are synchronized between players, like adding bugs or money. These can be run locally, but any online synchronized methods will be faster to run for the host machine. If you are unsure, using Local will be fine, but if you run a synchronized method using the '''Everyone''' RunType, the method will get called multiple times. E.g. if you are adding money to a company, then that money will be added again to the same company for each player connected.
 
* '''Host''', which means the script will only run on the current hosting player's computer. Example: You are only calling methods which are synchronized between players, like adding bugs or money. These can be run locally, but any online synchronized methods will be faster to run for the host machine. If you are unsure, using Local will be fine, but if you run a synchronized method using the '''Everyone''' RunType, the method will get called multiple times. E.g. if you are adding money to a company, then that money will be added again to the same company for each player connected.
 
* '''Everyone''', which means the script will run for every player connected. Example: You are changing aspects of the product (like the price) or a company, which will not be synchronized by default, so you want the script to run for all players in the game, so everyone is on the same page.
 
* '''Everyone''', which means the script will run for every player connected. Example: You are changing aspects of the product (like the price) or a company, which will not be synchronized by default, so you want the script to run for all players in the game, so everyone is on the same page.
 +
 +
 +
Note that the RunType value is only valid for the EndOfDay, OnRelease and NewCopies entry points. AfterSales is only ever executed for the host and WorkItemChange is only ever executed for the local player.
    
==== Script example ====
 
==== Script example ====

Navigation menu