Parent

From GECK
Jump to: navigation, search

A function to reference elements of the previous tile which is defined as "Parent" often through Rect/HotRect/Template, etc...

Syntax

<copy src="parent()" trait="Something"/>

You may use sub, div, mul, etc... here instead of copy

Exemple

<rect name="SomeRect">
    <x>100</x>
    <image name="SomeTile">
        <x><copy src="parent()" trait="x"/></x>
    </Image>
</rect>
<_Trait>10</_Trait>
<rect name="SomeRect">
    <x>100</x>
    <y><copy src="parent()" trait="_Trait"/></y>
    <image name="SomeTile">
        <x><copy src="parent()" trait="x"/></x>
    </Image>
</rect>

See Also

XML Reference Operators