User Tools

Site Tools


en:examples:config:getting_values_source_section

Getting the source section of a value

This is for sections that are inherited, and you want to know what section the inherited value comes from.

Example Config

[WeaponPointing]
Hits = 10000
 
[[email protected]]
Plasma = true
Beam = true
 
[[email protected]]
Type = Boss

Code

	if (orxConfig_HasSection("Enemy")){
		if (orxConfig_PushSection("Enemy") != orxSTATUS_FAILURE){
			orxU32 hits = orxConfig_GetU32("Hits");
			const orxSTRING sectionHitIsIn = orxConfig_GetValueSource("Hits");
		}
	}

Result

10000

WeaponPointing

See also

en/examples/config/getting_values_source_section.txt · Last modified: 2020/06/30 17:02 (19 months ago) by sausage