User Tag List

Results 1 to 8 of 8

Thread: Enemy Generator

  1. #1
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,611
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.9%

    Enemy Generator

    This enemy generator code now works.

    Code:
    // =======================================================
    // ENEMY SPAWNER - This script is used to spawn enemies.  The FFC running
    // the script will continue to spawn a particular kind of enemy at regular intervals
    // until there are too many on the screen, or the combo used by the spawner changes.
    //
    // D0 = enemy_id = The enemy to be spawned.  Check the table in std.zh to get values.
    // D1 = delay = The delay, in tics, between enemy spawns.
    // D2 = max = The maximum number of enemies that the spawner will put on the screen.  
    // D3 = spawnX = The X value at which you want the enemy to spawn.
    // D4 = spawnY = The Y value at which you want the enemy to spawn.
    // ======================================================
    
    
    ffc script enemyspawner{
    
    	void run(int enemy_id, int delay, int max, int spawnX, int spawnY){	
    						
    
    		int original_combo = this->Data;	// Saves the original combo of this FFC.
    
    		int counter = delay;			// Used to count the tics until it is time to spawn.
    
    		while(true){
    			// Checks whether the combo for this FFC has changed, or whether there are 
    			// a maximum number of NPCs on the screen.
    			if ( (this->Data == original_combo) && (Screen->NumNPCs() < max) ){
    
    				// If max tics have gone by since the last time a spawn took place, spawn.
    				if ( counter == 0 ){
    					npc spawnee = Screen->CreateNPC(enemy_id);
    					spawnee->X = spawnX;
    					spawnee->Y = spawnY;
    					counter = delay;
    				}
    				else{
    					counter--;
    				} // end if
    			} // end if
    			Waitframe();
    		} // end of while loop
    	} // end of void run
    } // end of FFC script

  2. #2
    Wizrobe The_Amaster's Avatar
    Join Date
    Dec 2005
    Location
    St. Mystere
    Age
    32
    Posts
    3,803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,810
    Level
    28
    vBActivity - Bars
    Lv. Percent
    26.09%

    Re: Enemy Generator

    Soo...what does it do? I'm sorry, I'm no good at interperating code.

  3. #3
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,611
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.9%

    Re: Enemy Generator

    I include a detailed description of each script in the comments.

    // ================================================== =====
    // ENEMY SPAWNER - This script is used to spawn enemies. The FFC running
    // the script will continue to spawn a particular kind of enemy at regular intervals
    // until there are too many on the screen, or the combo used by the spawner changes.
    //
    // D0 = enemy_id = The enemy to be spawned. Check the table in std.zh to get values.
    // D1 = delay = The delay, in tics, between enemy spawns.
    // D2 = max = The maximum number of enemies that the spawner will put on the screen.
    // D3 = spawnX = The X value at which you want the enemy to spawn.
    // D4 = spawnY = The Y value at which you want the enemy to spawn.
    // ================================================== ====

    So you can make a beehive that constantly spits out bees (keese?), for instance. Set the FFC to be a Strike combo if you'd like Link to be able to turn it off by hitting it. Be creative, there are lots of uses for this.

  4. #4
    Gibdo
    Join Date
    Mar 2004
    Age
    40
    Posts
    910
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,248
    Level
    18
    vBActivity - Bars
    Lv. Percent
    36.53%

    Re: Enemy Generator

    You should post a quest so people can check it out.

  5. #5
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,611
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.9%

    Re: Enemy Generator

    I did. Go check my thread over in the Developer's forum.

  6. #6
    Keese
    Join Date
    Aug 2005
    Age
    39
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    949
    Level
    10
    vBActivity - Bars
    Lv. Percent
    69.03%

    Re: Enemy Generator

    Hmm, a Gauntlet Quest is now in order :)

  7. #7
    Gibdo bluedeath's Avatar
    Join Date
    Jul 2006
    Location
    New Brunswick, Canada
    Age
    30
    Posts
    720
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,775
    Level
    17
    vBActivity - Bars
    Lv. Percent
    14.76%

    Re: Enemy Generator

    I cant find the quest..

  8. #8
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,611
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.9%

    Re: Enemy Generator

    Then just implement the code yourself according to the instructions in the comments. Given that you're having a hard time finding the quest file, I bet it'll take you less time to compile it and set up an ffc than it will to download the file.

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