This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:getunitsettings [2024/01/27 06:42] – Added totem digitalizedMind | 4rpl:commands:getunitsettings [2025/05/13 18:35] (current) – Corrected spelling to be wrong to match what game was expecting durikkan | ||
---|---|---|---|
Line 14: | Line 14: | ||
Returns a table containing the settings for the specified unit. For certain built-in units, like an emitter, the settings are described in the table below. For these units, the settings are case sensitive. For custom units, the values returned are all defined variables for all attached scripts. If there are multiple scripts, the variables are merged and duplicates will overwrite each other. | Returns a table containing the settings for the specified unit. For certain built-in units, like an emitter, the settings are described in the table below. For these units, the settings are case sensitive. For custom units, the values returned are all defined variables for all attached scripts. If there are multiple scripts, the variables are merged and duplicates will overwrite each other. | ||
- | :!: Calling GetUnitSettings (Or SetUnitSettings) on a custom unit that does not have a script attached throws an exception and causes the script to terminate at that line. If the unit has a script, it works normally, even if it's completely blank. As such, it would be a safe practice to attach a null script to every decorative unit on a map. | + | :!: In code versions before 4RPL V4 (Game version2.5.0 and higher), |
+ | |||
=====Built-in Unit Names and Settings===== | =====Built-in Unit Names and Settings===== | ||
+ | :!: Unit names are case sensitive. The full list of unit names are in [[Unit Types]] | ||
<tabbox Emitter> | <tabbox Emitter> | ||
Line 49: | Line 52: | ||
* **" | * **" | ||
* **" | * **" | ||
- | * **"CarryEggProbability"** (float): The probability (expressed as a float from 0 to 100) that the emitted blob will be able to carry eggs. \\ | + | * **"CaryEggProbability"** (float): The probability (expressed as a float from 0 to 0.01, i.e .005 is 50%) that the emitted blob will be able to carry eggs. Note that it is misspelled in game as Cary. \\ |
<tabbox SkimmerFactory> | <tabbox SkimmerFactory> |