getMissionConfig: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
(updated SeeAlso) |
||
(7 intermediate revisions by one other user not shown) | |||
Line 11: | Line 11: | ||
# External ''[[Description.ext]]'' file | # External ''[[Description.ext]]'' file | ||
# [[Eden_Editor:_Scenario_Atttributes|Eden Editor]] scenario attribute | # [[Eden_Editor:_Scenario_Atttributes|Eden Editor]] scenario attribute | ||
So if attribute exists in both places, attribute from [[description.ext]] is used. Previously, scenario attributes were extracted from ''Description.ext'' using [[missionConfigFile]]. That still works, but it ignores attributes set directly in the editor and it should not be used anymore. | So if attribute exists in both places, attribute from [[Description.ext|description.ext]] is used. Previously, scenario attributes were extracted from ''Description.ext'' using [[missionConfigFile]]. That still works, but it ignores attributes set directly in the editor and it should not be used anymore. | ||
|s1= | |s1= [[getMissionConfig]] attribute | ||
|p1= attribute: [[String]] - attribute name | |p1= attribute: [[String]] - attribute name | ||
|r1= [[Config]] | |r1= [[Config]] | ||
|x1= < | |x1= <sqf>_header = getMissionConfig "Header";</sqf> | ||
Returns scenario header config. Replaces the previous approach which would scan only the external ''Description.ext'' file, but ignore the value set in the Eden Editor: | Returns scenario header config. Replaces the previous approach which would scan only the external ''Description.ext'' file, but ignore the value set in the Eden Editor: | ||
< | <sqf>_header = missionConfigFile >> "Header"; // Old approach</sqf> | ||
|seealso= [[getMissionConfigValue]] | |seealso= [[getMissionConfigValue]] [[missionConfigFile]] [[BIS_fnc_getParamValue]] [[Mission_Parameters]] | ||
}} | }} |
Latest revision as of 13:18, 18 June 2023
Description
- Description:
- Returns Config entry for the given scenario attribute from the 1st tier. The attribute can be config class or config property. If it is defined in multiple places, the command checks them in the following order:
- External Description.ext file
- Eden Editor scenario attribute
- Groups:
- ConfigMission Information
Syntax
- Syntax:
- getMissionConfig attribute
- Parameters:
- attribute: String - attribute name
- Return Value:
- Config
Examples
- Example 1:
- Returns scenario header config. Replaces the previous approach which would scan only the external Description.ext file, but ignore the value set in the Eden Editor:
Additional Information
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