#SEQUENCE "start";
# sound_play("arges_flash2.wav", this_x(), this_y(), 1, 24 );
# seq_jump("charge_01");

#SEQUENCE "charge_01";
# particle_make( "light_charge_red_01", add(rand(-.75,.75), this_x()), add(rand(-.75,.75), this_y()), add(this_z(), 1));
  lvar("count", add(lvar("count"), .02));
# var func = nop;
  func = if(geq(lvar("count"), 1), seq_jump, nop);
  func("shoot");
# wait(.02, 1);
  move_to( char_get_x("player"), char_get_y("player"), 0 );

#SEQUENCE "shoot";
# particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  particle_make( "greek_01", this_x(), this_y(), add(this_z(), 1), rand(-1,1), rand(-1,1), rand(3,6), rand(.5,1));
  light_make("arges", this_x(), this_y(), 12, 1.0, 0.9, 0.9, 1, 12, 12);

  var x = char_get_x("player");
  var y = char_get_y("player");
  var dx = sub( x, this_x() );
  var dy = sub( y, this_y() );
  lvar("dist", sqrt( add( mult(dx,dx), mult(dy,dy) ) ));
  var func = nop;
  func = if( and(less( lvar("dist"), 50 ), greater(this_sees_char( "player", -179, 179 ), 0)), seq_jump, nop );
  func("flash"); 
# wait( 1, 1);
  move_to(char_get_x("player"), char_get_y("player"), 0);
# this_control_pop(); light_kill("arges");
# wait( 5 );

#SEQUENCE "flash";
# lvar("time", div(30, add(lvar("dist"), .1)));
  lvar("time", if(geq(lvar("time"), 5), 5, lvar("time")));
  screenFX_make( "fade_flash", "wash", "*color = colorRGB(1.0,1.0,0.6); *variance = 0.1; *additive = 1;" );
  screenFX_fade( "fade_flash", .1, mult(lvar("time"), .75) );
  sound_play("arges_flash.wav", this_x(), this_y(), 1, 24 );
# wait(lvar("time"));
# screenFX_kill( "fade_flash", lvar("time") );
# this_control_pop(); light_kill("arges");
# wait( 5 );
