#GENERAL
*name = add("spawn_cave", num_to_str(avar("spawn_cave_id")));
*faction = "spawn";

*rad         = 3.0;
*mass        = 1000000.0;
*elasticity  = 0.1;
*drag        = 0.5;
*friction    = 8.5;
*hardness    = 0.2;

*model = "npc_spawn-o-pod_01";
//*model_col = colorRGB(0.3, 0.1, 0.1);
*model_rot = 0.0;
*model_scale = 3.0;
*bleed_rate = 3.0;
*leak_decal_vec = {"decals/big_blood_01.tga"};
*dam_part_vec = {"blood_01"};

#ATTRIBUTE "attract";
#BASE      20.0;
#ATTRIBUTE "leak";
#BASE      0.0;
#ATTRIBUTE "speed";
#BASE      0.0;
#ATTRIBUTE "power";
#BASE      0.0;
#ATTRIBUTE "health";
#BASE      1000.0;
#ATTRIBUTE "res";
#BASE      1.0;
#ATTRIBUTE "rot_speed";
#BASE      40.0;
#ATTRIBUTE "exp";
#BASE      0.0;
#ATTRIBUTE "spawn_id";
#BASE      avar("spawn_cave_id");
#ATTRIBUTE "spawn_init";
#BASE      avar("spawn_cave_init");
#ATTRIBUTE "spawn_wait";
#BASE      avar("spawn_cave_wait");
#ATTRIBUTE "spawn_release";
#BASE      avar("spawn_cave_release");
#ATTRIBUTE "spawn_r_wait";
#BASE      avar("spawn_cave_r_wait");
#ATTRIBUTE "spawn_max";
#BASE      avar("spawn_cave_max");
#ATTRIBUTE "spawn_total";
#BASE      0.0;
#ATTRIBUTE "spawned";
#BASE      0.0;

#ON_DAMAGE

  sound_play( add("monsters/spit_0", num_to_str(rand(1, 4.99)), ".wav"), this_x(), this_y(), 1 );

#ON_DEATH

  explosion_make(this_x(), this_y(), 4.0, 0.5, 100);
  sound_play("city/explode3.wav", this_x(), this_y(), 1);
  script_load(add("forest/spawn_cave_dead", num_to_str(this_get_attribute("spawn_id"))));
  avar(add("spawn_cave", num_to_str(this_get_attribute("spawn_id")),"_dead"), 1);

#CONTROL "script";
##BEGIN

#SEQUENCE "base";
# wait (.001);
# this_item_make( "banana_03", 1 );
  this_item_make( "coin_02", 1 );
# seq_jump("start");

#SEQUENCE "start";
# avar(add("monster_type", num_to_str(this_get_attribute("spawn_id"))), avar("monster_type"));
  char_make(avar("monster_type"), rand(500, 550), rand(500, 550), avar(add("monster_type", num_to_str(this_get_attribute("spawn_id")))), 1 );
# avar(add("monster_typeb", num_to_str(this_get_attribute("spawn_id"))), avar("monster_typeb"));
  char_make(avar("monster_typeb"), rand(500, 550), rand(500, 550), avar(add("monster_typeb", num_to_str(this_get_attribute("spawn_id")))), 1 );
# seq_jump("spawn");

#SEQUENCE "spawn";
# wait( 10000 );

##END
