Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int LASER_SHOW_SCRIPT= 160;
- const int LASER_SFX = 80;
- ffc script Laser_Show{
- void run(int enemyID,int misc,float angle, int timer, int type){
- int color;
- npc boss = FindNPC(enemyID,misc);
- if(type==0){
- Game->PlaySound(LASER_SFX);
- while(timer>0){
- color= (color +1)%16;
- Laser(2, CenterX(boss) + VectorX(boss->HitWidth/2,angle),
- CenterY(boss)+VectorY(boss->HitHeight/2,angle), 8, angle, boss->WeaponDamage, color);
- timer--;
- if (boss->HP <= 1){
- this->Data = 0;
- this->Script = 0;
- Quit();
- }
- Waitframe();
- }
- }
- else if(type==1){
- while(timer>0){
- color= (color +1)%16;
- Laser(2, CenterX(boss)+ VectorX(boss->HitWidth/2,angle),
- CenterY(boss)+VectorY(boss->HitHeight/2,angle), 8, angle, boss->WeaponDamage, color);
- Laser(2, CenterX(boss)+ VectorX(boss->HitWidth/2,angle+180),
- CenterY(boss)+VectorY(boss->HitHeight/2,angle+180), 8, angle+180, boss->WeaponDamage, color);
- timer--;
- if (boss->HP <= 1){
- this->Data = 0;
- this->Script = 0;
- Quit();
- }
- angle = (angle+1)%360;
- Waitframe();
- }
- }
- else if(type==2){
- while(timer>0){
- color= (color +1)%16;
- Laser(2, CenterX(boss)+ VectorX(boss->HitWidth/2,angle),
- CenterY(boss)+VectorY(boss->HitHeight/2,angle), 8, angle, boss->WeaponDamage, color);
- Laser(2, CenterX(boss)+ VectorX(boss->HitWidth/2,angle-90),
- CenterY(boss)+VectorY(boss->HitHeight/2,angle-90), 8, angle-45, boss->WeaponDamage, color);
- Laser(2, CenterX(boss)+ VectorX(boss->HitWidth/2,angle+90),
- CenterY(boss)+VectorY(boss->HitHeight/2,angle+90), 8, angle+45, boss->WeaponDamage, color);
- timer--;
- if (boss->HP <= 1){
- this->Data = 0;
- this->Script = 0;
- Quit();
- }
- Waitframe();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement