From Bohemia Interactive Community
Hover & click on the images for description
Description
- Description:
- Loads the given file as a Config, allowing easy processing of the config file contents using commands such as configClasses, configProperties, >>, etc. It can load .rvmat, .bisurf, .cpp, .bin, .sqm, and description.ext files (both binarized and unbinarized configs are supported).
⚠
Loading a config can be very slow. The config should only be loaded once and cached. For example, the result can be stored in a
HashMap of
File Path → Config pairs. (See
Example 2).
⚠
It is advised to store the generated config in a variable, otherwise it will get destroyed if it's not being referenced directly (see Example 4)
- Groups:
- Config
Syntax
- Syntax:
- loadConfig path
- Parameters:
- path: String - path to the file, which should be in a valid config format.
- Return Value:
- Config - loaded config. Returns configNull if the file doesn't exist.
Examples
- Example 1:
- Example 2:
- Example 3:
- Example 4:
-
Additional Information
- See also:
- loadFile >> configFile configClasses isText isNumber isArray isClass configName getText getNumber getArray
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here!
Add Note
- Dedmen - c
- Posted on Mar 22, 2022 - 09:14 (UTC)
-
When trying to load a terrain surface name, like you get from Ammo Eventhandlers when you hit the terrain, you can simply use
You can recognize surface names by them not having any \ path seperators in them, they usually start with gdt, for example "gdtvrsurface01".