[Script] Seal Script

Viper Snake

Member
A simple script that allows an entity to seal itself. Thanks to Piccolo for fixing it.

Code:
void seal(int Time, int Energy)
{// Prevent an entity from using specials.
 // Time = Amount of time before this entity can use specials again.
 // Energy = If the freespecial costs less than this amount it can still be used. Use -1 for no specials ever.
    void self = getlocalvar("self");
    changeentityproperty(self, "sealtime", openborvariant("elapsed_time") + Time);
    changeentityproperty(self, "seal", Energy);	
}

Example:
@cmd seal 300 -1
The entity will be unable to use specials for a delay of 300.
 
sealtime probably uses absolute time as reference.

Code:
void seal(int Time, int Energy)
{// Prevent an entity from using specials.
 // Time = Amount of time before this entity can use specials again.
 // Energy = If the freespecial costs less than this amount it can still be used. Use -1 for no specials ever.
    void self = getlocalvar("self");
    changeentityproperty(self, "sealtime", openborvariant("elapsed_time") + Time);
    changeentityproperty(self, "seal", Energy);	
}
 
Back
Top Bottom