User Tag List

Results 1 to 4 of 4

Thread: Instill energy and Rapid fire statue.

  1. #1
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.24%

    Talking Instill energy and Rapid fire statue.

    Instill energy will turn any ordinary screen enemy into a regenerating killing machine, and rapid fire statue, well, um, it's a statue that fires rapidly...or not, it's up to you.

    Uses:

    Give the Instill Energy to an otherwise boring enemy, such as the Digdogger, or Aquamentus, maybe the digdogger kids too.

    You can use the statue script for, well, a statue... Maybe place it on an unwalkable combo?
    Actually, You might want to link it to another ffc for something really sick. Perhaps a few rapid fire scripts linked to an enemy with Instill energy? Yep...they're both in the same thread for a reason.


    Code:
    //=============================================================
    // 		FFC SCRIPT INSTILL ENERGY
    // D0 - the first of four ffc's to use as projectiles
    // D1 - new enemy HP amount
    // D2 - delay between rapid fire attack (in ticks) /default is 300
    // D3 - combo to use as projectiles
    // D4 - CSet of projectiles
    // D5 - speed of projectiles
    // D6 - screen enemy number to instill energy to
    // D7 - the HP regeneration of the instilled enemy :O
    //=============================================================
    
    ffc script Instill_Energy{
    
    	void run(int fireball_number, int enemyHP, int max_delay, int cdata, int cset, int speed, int screen_enemy_number, int regen){
    
    		int fire = fireball_number;
    		
    		if(max_delay == 0){max_delay = 300;}
    
    		int enemy_number = 0;
    		npc enemy;
    		ffc shoot;
    
    		int delay = 0;
    
    		Waitframes(4);
    
    		npc fire_master = Screen->LoadNPC(screen_enemy_number);
    		npc firestorm;
    		fire_master->HP = enemyHP;
    
    		while(true){
    
    			if(fire_master->isValid()){
    		
    				if(fire >= fireball_number+4){fire = fireball_number;}
    	
    				this->X = fire_master->X; this->Y = fire_master->Y;
    				if(delay > max_delay){
    					delay = 0;
    					fire_master->HP = fire_master->HP + regen;
    				}
    				if(delay==20||delay==40||delay==60||delay==80){
    
    					shoot = Screen->LoadFFC(fire);
    					shoot->Data = cdata;
    					shoot->CSet = cset;
    					shoot->X = this->X; shoot->Y = this->Y;					
    
    					int dx = Link->X - this->X;
    					int dy = Link->Y - this->Y;
    					float norm = Sqrt(dx*dx+dy*dy);
    					if(norm > 0)
    					{
     						shoot->Vx = dx/norm*speed;
     						shoot->Vy = dy/norm*speed;
    					}
    					fire++;
    				}
    			delay++;
    			}
    			else{
    				this->X = 0; this->Y = 0; this->Data = 0;
    			}
    		Waitframe();
    		}
    	}
    }

    Code:
    //===================================================================================
    //			FFC SCRIPT RAPID FIRE STATUE
    // D0 - the first ffc to use as projectiles
    // D1 - the amount of ffc's to use for fireballs. Ex D0; 2, and D1 5, will use ffc's 2-7. 
    // D2 - speed of projectile
    // D3 - combo of projectile
    // D4 - Cset of projectile
    // D5 - Max delay in ticks before the firing sequence restarts
    // D6 - Delay between shots     *Note* It will fire five shots
    // during the max delay sequence. If you want non-stop firing divide max delay by five.
    // ex: Delay - 20, max delay 100. -for crazy statues try delay 8, max 50.
    // if the combo of the statue changes the shooting will stop.
    // D7 - the ffc to link this ffc to.
    //====================================================================================
    
    
    ffc script Rapid_fire_statue{
    
    	void run(int fireball_number, int fireball_amount, int speed, int cdata, int cset, int max_delay, int fireball_delay, int linked_ffc){
    
    		int fire = fireball_number;
    		int swap = fireball_amount;
    		int armed = fireball_delay;
    		ffc shoot;
    		int delay = 0;
    		int original_combo = this->Data;
    		ffc linked = Screen->LoadFFC(linked_ffc);
    
    		if(max_delay == 0){max_delay = 300;}
    
    		while(true){
    
    			if(linked_ffc != 0){ this->X = linked->X; this->Y = linked->Y;}
    			if(fire > fireball_number+swap){ fire = fireball_number;}
    			if(delay > max_delay){delay = 0;}
    
    			if(this->Data == original_combo){
    
    				if(delay==armed||delay==armed+armed||delay==armed+armed+armed||
    					delay==armed+armed+armed+armed||delay==armed+armed+armed+armed+armed){
    
    					shoot = Screen->LoadFFC(fire);
    					shoot->Data = cdata;
    					shoot->CSet = cset;
    					shoot->X = this->X; shoot->Y = this->Y;					
    
    					int dx = Link->X - this->X;
    					int dy = Link->Y - this->Y;
    					float norm = Sqrt(dx*dx+dy*dy);
    					if(norm > 0)
    					{
     						shoot->Vx = dx/norm*speed;
     						shoot->Vy = dy/norm*speed;
    					}
    					fire++;
    				}
    			delay++;
    			}
    		Waitframe();
    		}
    	}
    }
    Thanks DD for the distance routine.


    -Have fun!
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  2. #2
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,936
    Level
    28
    vBActivity - Bars
    Lv. Percent
    43.01%

    Re: Instill energy and Rapid fire statue.

    So evil. I think I am going to have some fun with these scripts.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  3. #3
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.24%

    Re: Instill energy and Rapid fire statue.

    Updated the rapid fire script, which, I had completely forgot about. Though it seems no one noticed.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  4. #4
    Octorok
    Join Date
    Nov 2006
    Age
    29
    Posts
    463
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,771
    Level
    14
    vBActivity - Bars
    Lv. Percent
    8.25%

    Re: Instill energy and Rapid fire statue.

    Cool, I'll try using that.

    Click here to level up my card, or be sacrificed... ^_^

    Want to see Shattered Earth, AGN's RPG, back? Got a computer that is capable of running a server? PM me!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social