RuneI
Class Runes

source: c:\runehov\RuneI\Classes\Runes.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Pickup
            |
            +--RuneI.Runes
Direct Known Subclasses:RuneOfHealth, RuneOfPower, RuneOfPowerRefill, RuneOfStrength, RuneOfStrengthRefill

class Runes
extends Engine.Pickup

//============================================================================= // Runes. //=============================================================================
Variables
 float RunePower
 class SpheresClass
 ParticleSystem spheres

States
Sleeping

Function Summary
 int GetUsePriority()
     
//============================================================================
//
// GetUsePriority
//
// Returns the priority of the weapon, lower is better
//============================================================================
 bool PawnWantsRune(Pawn Other)
 void PreBeginPlay()


State Sleeping Function Summary
 void EndState()
 void BeginState()



Source Code


00001	//=============================================================================
00002	// Runes.
00003	//=============================================================================
00004	class Runes extends Pickup
00005		abstract;
00006	
00007	var() float RunePower;
00008	var() class<ParticleSystem> SpheresClass;
00009	var ParticleSystem spheres;
00010	
00011	function PreBeginPlay()
00012	{
00013		Super.PreBeginPlay();
00014	
00015		if(SpheresClass != None)
00016		{
00017			spheres = Spawn(SpheresClass,self,,Location);
00018			if(spheres != None)
00019				AttachActorToJoint(spheres, 1);
00020		}
00021	}
00022	
00023	//============================================================================
00024	//
00025	// GetUsePriority
00026	//
00027	// Returns the priority of the weapon, lower is better
00028	//============================================================================
00029	
00030	function int GetUsePriority()
00031	{
00032		return(3);
00033	}
00034	
00035	function bool PawnWantsRune(Pawn Other)
00036	{// return whether the pawn should currently want this rune
00037		return true;
00038	}
00039	
00040	
00041	State Sleeping
00042	{
00043		ignores Touch;
00044	
00045		function BeginState()
00046		{
00047			if (spheres != None)
00048				spheres.bHidden = true;
00049	
00050			AmbientSound = None;
00051	
00052			Super.BeginState();
00053		}
00054	
00055		function EndState()
00056		{
00057			if (spheres != None)
00058				spheres.bHidden = false;
00059	
00060			AmbientSound = Default.AmbientSound;
00061	
00062			Super.EndState();
00063		}
00064	}
00065	
00066	defaultproperties
00067	{
00068	     RespawnTime=30.000000
00069	     RespawnSound=Sound'OtherSnd.Respawns.respawn01'
00070	     PickupMessageClass=Class'RuneI.PickupMessage'
00071	     DrawScale=0.500000
00072	     ScaleGlow=3.000000
00073	}

End Source Code