//Simply attach the ffc to a screen and set the arguments as follows: //d0 = the slot number of the enemy //d1 = the sprite to use for the fire //d2 = the number of flames to shoot in a stream //d3 = the time in frames between each flame //d4 and d5 are the minimum and maximum time the enemy will wait before firing another stream. ffc script Flamethrower{ void run(int num, int sprite, int shots, int spread, int min_wait, int max_wait){ while(Screen->NumNPCs() == 0) Waitframe(); npc enemy = Screen->LoadNPC(num); while(enemy->isValid()){ for(int i = 0; i < shots; i++){ FireBreath(enemy, sprite); Game->PlaySound(SFX_FIRE); Waitframes(spread); } Waitframes(Rand(min_wait,max_wait)); } } void FireBreath(npc enemy, int sprite){ eweapon flame = Screen->CreateEWeapon(EW_FIRE); flame->UseSprite(sprite); flame->Damage = enemy->WeaponDamage; flame->Angular = true; flame->X = enemy->X; flame->Y = enemy->Y; flame->Angle = DegtoRad(Angle(enemy->X,enemy->Y,Link->X,Link->Y)); flame->Dir = RadianAngleDir8(WrapAngle(flame->Angle)); flame->Step = 400; } }