name		Platfer
type		none
setlayer	1
aggression	1
antigravity	100
subject_to_wall 0
subject_to_obstacle 0
subject_to_platform 0
animationscript data/scripts/2Dscript.c


anim spawn
    delay	10
    offset	64 14 
    frame	data/chars/misc/platform/platfer1.png

anim idle
@script
    void self = getlocalvar("self");
    int Aggro = getentityproperty(self,"aggression");

    if(frame == 1){
      if(Aggro == 1){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
      } else if(Aggro == 2){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
      }
    }
@end_script
    loop	1
    delay	10
    offset	64 14 
    platform	64 14 -64 -64 64 64 15 15
    frame	data/chars/misc/platform/platfer1.png
    frame	data/chars/misc/platform/platfer2.png

anim follow1
    loop	1
    delay	10
    offset	64 14 
    platform	64 14 -64 -64 64 64 15 15
    @cmd	dasher 0 0.5 0
    frame	data/chars/misc/platform/platfer1.png
    frame	data/chars/misc/platform/platfer2.png
    frame	data/chars/misc/platform/platfer1.png
    @cmd	looper 1 36
    frame	data/chars/misc/platform/platfer2.png
    @cmd	dasher 0 -0.5 0
    frame	data/chars/misc/platform/platfer1.png
    frame	data/chars/misc/platform/platfer2.png
    frame	data/chars/misc/platform/platfer1.png
    @cmd	looper 5 36
    frame	data/chars/misc/platform/platfer2.png

anim follow2
    loop	1
    delay	10
    offset	64 14 
    platform	64 14 -64 -64 64 64 15 15
    @cmd	dasher 0 -0.5 0
    frame	data/chars/misc/platform/platfer1.png
    frame	data/chars/misc/platform/platfer2.png
    frame	data/chars/misc/platform/platfer1.png
    @cmd	looper 1 36
    frame	data/chars/misc/platform/platfer2.png
    @cmd	dasher 0 0.5 0
    frame	data/chars/misc/platform/platfer1.png
    frame	data/chars/misc/platform/platfer2.png
    frame	data/chars/misc/platform/platfer1.png
    @cmd	looper 5 36
    frame	data/chars/misc/platform/platfer2.png
