Quantcast Lua equivalent for Animation.targetKey - WoWInterface
Thread Tools Display Modes
Unread 03-22-13, 06:45 PM   #1
This Space For Rent
Haleth's Avatar
WoWInterface Super Mod
Join Date: Sep 2008
Posts: 1,173
Lua equivalent for Animation.targetKey

I've noticed that in Blizzard's XML code, animations can have a 'targetKey' attribute which specifies which region of the animation's animation group's target frame () is animated. This allows frames to have multiple animations which each affect a different region of the frame, rather than the frame as a whole.


<Frame name="WorldMapPing" framestrata="FULLSCREEN" hidden="true">
		<Size x="64" y="64"/>
			<Anchor point="CENTER" relativeTo="WorldMapFrame"/>
			<Layer level="OVERLAY">
				<Texture parentKey="centerRing" file="Interface\minimap\UI-Minimap-Ping-Center">
					<Size x="32" y="32"/>
						<Anchor point="CENTER"/>
				<Texture parentKey="rotatingRing" file="Interface\minimap\UI-Minimap-Ping-Rotate">
					<Size x="48" y="48"/>
						<Anchor point="CENTER"/>
				<Texture parentKey="expandingRing" file="Interface\minimap\UI-Minimap-Ping-Expand">
					<Size x="32" y="32"/>
						<Anchor point="CENTER"/>
			<AnimationGroup parentKey="Ping" looping="REPEAT">
				<Rotation targetKey="$parent.$parent.rotatingRing" degrees="-180" duration="0.75" order="1"/>
				<Scale targetKey="$parent.$parent.expandingRing" scaleX="1.75" scaleY="1.75" duration="0.75" order="1"/>
					<OnPlay function="WorldMapPing_OnPlay"/>
					<OnLoop function="WorldMapPing_OnLoop"/>
					<OnStop function="WorldMapPing_OnStop"/>
The only way to more or less replicate this in lua is to create an animation group for the region itself, apparently, and then attach the animation to that animation group. This would mean having several animation groups, one for each region.

Is there any lua API to replicate the XML functionality?

Reason I'm asking this is because I'm trying to more or less restore the old world map player arrow. I managed to scale the thing down again and I can edit individual animations, but I'm trying to assign the scale animation to rotatingRing instead of expandingRing (which I'll hide).

Last edited by Haleth : 03-22-13 at 06:47 PM.
Haleth is offline   Reply With Quote

Go BackWoWInterface » Developer Discussions » Lua/XML Help » Lua equivalent for Animation.targetKey

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off