Damage all enemies FREEZE

dantedevil

Well-known member
I have this script, but can't make it work with freeze and I don't know how set the freeze time here:
Code:
void damage_all_enemies(int damage, int drop, int stay, void atk_type)
{
 	int  iEntity;
        void vEntity;
        void self        = getlocalvar("self");
        int  iMax        = openborvariant("ent_max"); 
    int Def;
               
        for(iEntity=0; iEntity<iMax; iEntity++)
        {       
        vEntity = getentity(iEntity);
        Def = getentityproperty(vEntity, "defense", openborconstant("ATK_NORMAL50"));
		if(getentityproperty(vEntity, "type")==openborconstant("TYPE_enemy") && Def != 0)
		{		
		damageentity(vEntity,self,damage,drop,openborconstant(atk_type));
		changeentityproperty(vEntity, "staydown", "riseattack", stay);	
		}
	}	
}

I make some tries but not work.
 
Hmmm.... adding freeze attack won't be that simple cause it works differently.
Here's smartbomb script for freeze attack:
Code:
void StunBomb(float Time)
{/* StunBomb
    Originally smartbomb by
    Damon Vaughn Caskey
    07152008

    Stun bomb effect which hits all enemies
    
    Time: how long enemies will be stunned in seconds
    */

    void vSelf     = getlocalvar("self");             //Caller.
    void vEntity;                                     //Target entity placeholder.
    int  iEntity;                                     //Entity enumeration holder.
    int  iType;                                       //Entity type.
    int  iMax      = openborvariant("ent_max");       //Entity count.

     //Enumerate and loop through entity collection.
    for(iEntity=0; iEntity<iMax; iEntity++){
    
        vEntity = getentity(iEntity);                 //Get target entity from current loop.
        iType   = getentityproperty(vEntity, "type"); //Get target type.

        //Enemy type?
        if (iType == openborconstant("TYPE_ENEMY")){

          void iTime = openborvariant("elapsed_time") + getentityproperty(vEntity, "freezetime");

          changeentityproperty(vEntity, "frozen", 1);
          changeentityproperty(vEntity, "freezetime", iTime + Time*200);

        }
    }
}

It doesn't have damage parameter (yet) but it has scripts to define how long enemy will be frozen
 
Thanksmy friend!

If I understood correctly this script works as the stunt and not as the freeze.
That is, it freezes the enemy, without it changing to its freeze palette, right?
 
Back
Top Bottom