Room parameters are used by room files to produce slightly different room variations without needing to make seperate room files.
To add a parameter to a room, start with setting a variable in the init() function, for example:
function init()
myParameter = mgGetInt("test", 0) --first param is the name, the second param is the default value
...
end
You can use different mgGet functions to suit your needs. Here is the list of the functions:
mgGetBool() - boolean (true/false)
mgGetInt() - integer (-1, 2, 7, etc.)
mgGetFloat() - float (1.0, 8.1, -9.7, etc.)
mgGetString() - string ("hello", "example", "some text", etc.)
mgGetColor() - 3 floats (1 0.5 0, -1.2 0.6 1.9, etc. Default values should be seperated by commas. It's used commonly in obstacles, although it should also work normally in rooms)
After setting up the parameter in the room file, add it to the level file and set the value:
<level>
<room type="brownie/part1" length="250" start="true" end="true" test="2"/>
...
</level>
Now you can use the parameter in the room file!
Boss rooms
Ticking rooms