/***********************************************
 * _sparkle1.zes
 * 
 * Author: GD
 * Date:   2 July 2002
 *
 * Desc:   A sparkling animation which just plays through once then deletes itself
 *
 * Usage:  Created by other scripts
 *         
 * Sprites: _weaponsheet1.spt
 *         
 ***********************************************/
#include <animation>
#include <entity>
#include <general>

new SpakleAnim[20];
new x;
new y;

main()
{
	if (FirstRun())
	{		
		// Create 2 simple burning animations
		CreateAnim(10, SpakleAnim);
		AddAnimframe(SpakleAnim, 0,0, "_icerod10"); 
		AddAnimframe(SpakleAnim, 0,0, "_icerod11");
		AddAnimframe(SpakleAnim, 0,0, "_icerod12");
		SetAnimLoop(SpakleAnim, false);
		x = GetX("this");
		y = GetY("this");
	}
	
	// Draw the anim
	DrawAnim( SpakleAnim, x, y, y + 8);
	
	// see if the animation is over
	if ( FinishedAnim( SpakleAnim ) )
	{
		DeleteAnim( SpakleAnim );
		DeleteEntity("this")
	}
}
