User Tag List

Results 1 to 4 of 4

Thread: Armos->Next

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,622
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,575
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.86%
    To anyone who wants to use this script here is a tip: Make copies of the enemies you want to spawn and set their spawn type to instant. This will make the spawning look better.


  2. #2
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,622
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,575
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.86%
    A bug with the hitboxes causes the item saving portion of this script to sometimes not work. In order to fix it, you should change !LinkCollision(it) to it->isValid().

    That should be easy enough, but for those who can't be bothered, here is the corrected script:

    Code:
    //invisible combos used when setting to layers.
    const int CMB_SOLID = 9; //an invisible solid combo.
    const int CMB_INVIS = 8; //a non-solid invisible combo.
    
    ffc script ArmosNext
    {
    	void run(int enemy, int sfx, int delay, bool solid, int layer, int itemDrop, int d, int bit)
    	{
    		this->X = (this->X>>4)<<4; this->Y = (this->Y>>4)<<4; //align to combo grid
    		int posX = this->X;
    		item it;
    		int wait = delay;
    
    		if(solid){
    			if(!layer)
    				SetLayerComboD(layer, ComboAt(this->X, this->Y), this->Data);
    			else
    				SetLayerComboD(layer, ComboAt(this->X, this->Y), CMB_SOLID);
    		}
    		
    		while(!LinkCollision(this)) Waitframe();
    		
    		if(!enemy){
    			
    			if(solid){
    				while(delay){
    					if(LinkCollision(this)){
    						delay--;
    						this->X = posX + Rand(2);	
    						Game->PlaySound(sfx);	
    						Waitframe();
    					}
    				else delay = wait;
    				this->X = posX;
    				Waitframe();
    				}
    			}
    		}
    		else{
    			for(;delay>0;delay--){
    				this->X = posX + Rand(3)-1;	
    				Game->PlaySound(sfx);	
    				Waitframe();	
    			}
    			this->X = posX;
    			CreateNPCAt(enemy, this->X, this->Y);
    		}			
    		if(solid) {
    			if(!layer)
    				SetLayerComboD(layer, ComboAt(this->X, this->Y), this->Data+1);
    			else
    				SetLayerComboD(layer, ComboAt(this->X, this->Y), CMB_INVIS);
    		}
    		this->Data++;
    		
    		if(itemDrop && !(Screen->D[d]&bit)){
    			it = CreateItemAt(itemDrop, this->X, this->Y);
    			Game->PlaySound(SFX_SECRET);
    		}
    		while(itemDrop && it->isValid() && !(Screen->D[d]&bit)) Waitframe();
    		Screen->D[d] |= bit;
    	} //end run()	
    } //end script
    
    //D0 the enemy number to spawn (if 0 no enemy spawns)
    //D1 Sound to play while "Armos" shakes 
    //D2 how long to shake the FFC before spawning the enemy
    //D3 whether or not the armos is solid (0 is false; 1 is true; FFC Combo must be solid)
    //D4 what layer the FFC combo is placed on. (Solidity only works on layer 0, 1, and 2)
    //D5 item to drop
    //D6 Screen Data slot to store to
    //D7 Bit to store


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