RDCode: Difference between revisions

m
rdcode var reading since many events allow it
m (list redirect until page exists)
m (rdcode var reading since many events allow it)
Line 64: Line 64:


Note that, when converting between data types (e.g. <code>i0 = f0</code>, <code>b0 = i0</code>), floats will be '''rounded''' (0.5 rounding is inconsistent, can be upwards or downwards), and integers to booleans will return '''false''' if its equal to 0, otherwise '''true'''.
Note that, when converting between data types (e.g. <code>i0 = f0</code>, <code>b0 = i0</code>), floats will be '''rounded''' (0.5 rounding is inconsistent, can be upwards or downwards), and integers to booleans will return '''false''' if its equal to 0, otherwise '''true'''.
Certain events that have text-boxes are able to read these 30 variables, using curly brackets (<code>{}</code>), and having inside a valid RDCode arithmetic expression. (e.g. in a [[Floating Text]] event, <code>Current score: {i0}</code> will display the current value of <code>i0</code>).


There are '''non-readable but writeable''' variables that affect gameplay and visuals, and they're only able to be used in '''[[Call Custom Method]]''' events. E.g. <code>wobblyLines</code> (bool), <code>noHitFlashBorder</code> (bool), and <code>room[]</code> (this is a special '''array''' variable that can accept custom methods that affect individual rooms). See [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit List of Custom Methods] for a further list.
There are '''non-readable but writeable''' variables that affect gameplay and visuals, and they're only able to be used in '''[[Call Custom Method]]''' events. E.g. <code>wobblyLines</code> (bool), <code>noHitFlashBorder</code> (bool), and <code>room[]</code> (this is a special '''array''' variable that can accept custom methods that affect individual rooms). See [https://docs.google.com/spreadsheets/d/1JAz6iRLqcn08ZeTeBHeeDrpdX6M5K0b1qRVQomua21s/edit List of Custom Methods] for a further list.