getMissionConfig: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(updated SeeAlso) |
||
(29 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
|arma3| | |game1= arma3 | ||
|version1= 1.56 | |||
| | |gr1= Config | ||
| | |gr2= Mission Information | ||
| | |descr= 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 | # 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= [[getMissionConfig]] attribute | ||
|x1= < | |p1= attribute: [[String]] - attribute name | ||
|r1= [[Config]] | |||
|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> | ||
| [[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