Changes

Jump to navigation Jump to search
51 bytes added ,  17:26, 30 October 2023
Line 350: Line 350:  
* '''Local''', which means the script will only run on the computer for the player who owns the product (This is the default). Example: You want something to happen to the affected player's game, like launching a lawsuit or firing an employee. This needs to be done locally for the affected player, or someone else might be sued for no reason.
 
* '''Local''', which means the script will only run on the computer for the player who owns the product (This is the default). Example: You want something to happen to the affected player's game, like launching a lawsuit or firing an employee. This needs to be done locally for the affected player, or someone else might be sued for no reason.
 
* '''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 directly changing aspects of the product (like the price) or a company, by altering the value of local variables, 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.
     

Navigation menu