
####animationscript function main#####
# data/chars/k1/k1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==9)
    {


                		void self = getlocalvar("self");

 		if ((getentityproperty(self, "direction")==1)&&(frame == 2)){

		changeentityproperty(self, "velocity", 2, 0, 0);

		}

		if ((getentityproperty(self, "direction")==0)&&(frame == 2)){

		changeentityproperty(self, "velocity", -2, 0, 0);

		}

		if(frame == 5){

		void self = getlocalvar("self");

		changeentityproperty(self, "velocity", 0, 0, 0);

		}



	        return;
    }

}
