<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AWindowStartAlphaAnimation</id>
	<title>API:WindowStartAlphaAnimation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AWindowStartAlphaAnimation"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:WindowStartAlphaAnimation&amp;action=history"/>
	<updated>2026-10-19T21:42:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:WindowStartAlphaAnimation&amp;diff=30912&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:WindowStartAlphaAnimation&amp;diff=30912&amp;oldid=prev"/>
		<updated>2026-10-16T19:52:07Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Window}}&lt;br /&gt;
Starts an animation of a window&amp;#039;s alpha (opacity).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WindowStartAlphaAnimation(windowName, animationType, startAlpha, endAlpha, duration, setStartBeforeDelay, delay, loopCount)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;windowName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the window.&lt;br /&gt;
;animationType : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – How the value changes over time. Use a &amp;lt;code&amp;gt;Window.AnimationType&amp;lt;/code&amp;gt; constant (see below).&lt;br /&gt;
;startAlpha : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Alpha at the start of the animation.&lt;br /&gt;
;endAlpha : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Alpha at the end of the animation.&lt;br /&gt;
;duration : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Length of one pass from &amp;lt;code&amp;gt;startAlpha&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;endAlpha&amp;lt;/code&amp;gt;, in seconds.&lt;br /&gt;
;setStartBeforeDelay : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to apply &amp;lt;code&amp;gt;startAlpha&amp;lt;/code&amp;gt; straight away, during the delay. With &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, the window keeps its current alpha until the delay is over.&lt;br /&gt;
;delay : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Seconds to wait before the animation starts.&lt;br /&gt;
;loopCount : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – For &amp;lt;code&amp;gt;LOOP&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;REPEAT&amp;lt;/code&amp;gt;: how many passes to run before the animation ends. 0 runs until it is stopped. Ignored by the other types.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Animation types:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Constant !! Value !! Behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.SINGLE&amp;lt;/code&amp;gt; || 1 || Linear change from start to end, once. Then the window&amp;#039;s alpha goes back to the value it had before the animation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.SINGLE_NO_RESET&amp;lt;/code&amp;gt; || 2 || Linear change from start to end, once. The end value stays.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.SINGLE_NO_RESET_HIDE&amp;lt;/code&amp;gt; || 3 || Like &amp;lt;code&amp;gt;SINGLE_NO_RESET&amp;lt;/code&amp;gt;, and the window is hidden when the animation finishes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.EASE_OUT&amp;lt;/code&amp;gt; || 4 || Change from start to end along (time / duration)², so slow at first and fast at the end, once. The end value stays.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.EASE_OUT_HIDE&amp;lt;/code&amp;gt; || 5 || Like &amp;lt;code&amp;gt;EASE_OUT&amp;lt;/code&amp;gt;, and the window is hidden when the animation finishes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.LOOP&amp;lt;/code&amp;gt; || 6 || Linear back and forth: start to end, then back to start. One loop takes twice &amp;lt;code&amp;gt;duration&amp;lt;/code&amp;gt;. When it ends, the original alpha is restored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.REPEAT&amp;lt;/code&amp;gt; || 7 || Linear from start to end, then jumps back to start and repeats. When it ends, the original alpha is restored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.POP&amp;lt;/code&amp;gt; || 8 || A special curve. When it ends, the original alpha is restored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Window.AnimationType.POP_AND_EASE&amp;lt;/code&amp;gt; || 9 || A special curve. When it ends, the original alpha is restored.&lt;br /&gt;
|}&lt;br /&gt;
* Each frame the animated value is written to both the window&amp;#039;s alpha and its font alpha, so the text fades too. Child windows follow as with [[API:WindowSetAlpha|WindowSetAlpha]] and [[API:WindowSetFontAlpha|WindowSetFontAlpha]].&lt;br /&gt;
* &amp;quot;Original alpha&amp;quot; means the window&amp;#039;s alpha and font alpha at the moment the animation was started. Types 1 and 6–9 restore them both when they finish and when they are stopped with [[API:WindowStopAlphaAnimation|WindowStopAlphaAnimation]]. Types 2–5 leave the current value in place.&lt;br /&gt;
* The hiding of types 3 and 5 happens only when the animation finishes by itself, not when it is stopped.&lt;br /&gt;
* A window has at most one alpha animation. Starting a new one stops the old one first, including its reset.&lt;br /&gt;
* If both &amp;lt;code&amp;gt;duration&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;delay&amp;lt;/code&amp;gt; are 0, the animation is finished immediately without applying &amp;lt;code&amp;gt;endAlpha&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;animationType&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;loopCount&amp;lt;/code&amp;gt; are truncated to whole numbers.&lt;br /&gt;
* &amp;lt;code&amp;gt;easystem_windowutils/source/frame.lua&amp;lt;/code&amp;gt; passes &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;setStartBeforeDelay&amp;lt;/code&amp;gt; in a variable named &amp;lt;code&amp;gt;unsupportedParameter&amp;lt;/code&amp;gt;, with the comment that it &amp;quot;does not appear to be used&amp;quot;. The client does use it as described above.&lt;br /&gt;
* There is no lock check in this function.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;WindowStartAlphaAnimation&amp;#039;: Window %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A pulsing buff icon, from &amp;lt;code&amp;gt;eatemplate_unitframes/source/bufftracker.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WindowStartAlphaAnimation( self:GetName(), Window.AnimationType.LOOP, 1, 0.5, 1, true, 0, 0 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fading out combat text after a delay, from &amp;lt;code&amp;gt;easystem_eventtext/source/system_eventtext.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WindowStartAlphaAnimation( newEventFrame:GetName(), Window.AnimationType.EASE_OUT,&lt;br /&gt;
                           1, 0,&lt;br /&gt;
                           animationData.fadeDuration, false, animationData.fadeDelay, 0 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:WindowStopAlphaAnimation|WindowStopAlphaAnimation]]&lt;br /&gt;
* [[API:WindowStartPositionAnimation|WindowStartPositionAnimation]]&lt;br /&gt;
* [[API:WindowStartScaleAnimation|WindowStartScaleAnimation]]&lt;br /&gt;
* [[API:WindowSetAlpha|WindowSetAlpha]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>