User Tools

Site Tools


arma:config:inheritance

ArmA 1 Inheritance

ArmA 1 Forum, ArmA 1 Home, ArmA 1 Config, ArmA 1 Tools, ArmA 1 File Formats, ArmA 1 Missions, ArmA 1 3D Modeling, ArmA 1 Terrain, ArmA 1 Texturing, ArmA 1 Scripting

ArmA 1 aka Armed Assault (ArmA)

Inheritance in ArmA 1 configs.

If you create a custom addon, and you want to base your thing on something that already exists and does not need to be redefined, you can use the following example: (test2 will be equal to test1 in this example).

	class test1;
	class test2: test1 {};

You can inherit from other classes, e.g in this example, class test2 is equal to test1:

	class test1
	{
		val1 = 1;
		val2 = 2;
		val3 = 0;
	};
	class test2: test1{};

In this example, test2 inherits all variables and values of test1, but changes val2 and adds a val4:

	class test1
	{
		val1 = 1;
		val2 = 2;
		val3 = 0;
	};
	class test2: test1
	{
		val2 = 3;
		val4 = 1;
	};
arma/config/inheritance.txt · Last modified: 2024/08/01 07:41 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.