RuneI
Class LokiBloodZone

source: c:\runehov\RuneI\Classes\LokiBloodZone.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.ZoneInfo
            |
            +--RuneI.LokiBloodZone
Direct Known Subclasses:None

class LokiBloodZone
extends Engine.ZoneInfo

//============================================================================= // LokiBloodZone. //=============================================================================
Variables
 int Health
           Event that is called when the pool is out of health
 name HealthEmptyEvent
           Event that is called when the pool is out of health
 int HealthIncrement
           Amount of Health given to SarkRagnar per second
 int TotalHealth
           Total health contained within this LokiBloodPool


Function Summary
 int ExtractHealth()
 void PostBeginPlay()



Source Code


00001	//=============================================================================
00002	// LokiBloodZone.
00003	//=============================================================================
00004	class LokiBloodZone expands ZoneInfo;
00005	
00006	var() int TotalHealth;  // Total health contained within this LokiBloodPool
00007	var() int HealthIncrement; // Amount of Health given to SarkRagnar per second
00008	var() name HealthEmptyEvent; // Event that is called when the pool is out of health
00009	var int Health;
00010	
00011	function PostBeginPlay()
00012	{
00013		Super.PostBeginPlay();
00014		
00015		Health = TotalHealth;
00016	}
00017	
00018	function int ExtractHealth()
00019	{
00020		local int amount;
00021		
00022		if(Health <= 0)
00023			return(0);
00024			
00025		if(Health < HealthIncrement)
00026			amount = Health;
00027		else
00028			amount = HealthIncrement;
00029	
00030		Health -= amount;
00031		if(Health <= 0)
00032		{ // Loki blood ran out of health power
00033			FogDistance = 0;
00034			bFogZone = false;
00035		    bPainZone = false;
00036		    bLokiBloodZone = false;
00037			FireEvent(HealthEmptyEvent);		
00038		}
00039		
00040		return(amount);	
00041	}
00042	
00043	defaultproperties
00044	{
00045	     TotalHealth=100
00046	     HealthIncrement=10
00047	     DamagePerSec=20
00048	     bWaterZone=True
00049	     bFogZone=True
00050	     bPainZone=True
00051	     bLokiBloodZone=True
00052	     FogBrightness=100
00053	     FogHue=45
00054	     FogSaturation=80
00055	     FogDistance=1000.000000
00056	}

End Source Code