![]() ![]() If our current enemy is valid if ( self: GetEnemy() and IsValid( self: GetEnemy()) ) then - If the enemy is too far if ( self: GetRangeTo( self: GetEnemy():GetPos()) > self.LoseTargetDist ) then - If the enemy is lost then call FindEnemy() to look for a new one - FindEnemy() will return true if an enemy is found, making this function return true return self: FindEnemy() ![]() ENT:Get/SetEnemy() - Simple functions used in keeping our enemy saved - function ENT: SetEnemy(ent)Įnd - ENT:HaveEnemy() - Returns true if we have an enemy - function ENT: HaveEnemy()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |