RuneI
Class Bucket

source: c:\runehov\RuneI\Classes\Bucket.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--RuneI.DecorationRune
            |
            +--RuneI.Bucket
Direct Known Subclasses:None

class Bucket
extends RuneI.DecorationRune

//============================================================================= // Bucket. //=============================================================================

Function Summary
 bool CanBeUsed(Actor Other)
     
//============================================================================
//
// CanBeUsed
//
// Whether the actor can be used.
//============================================================================
 name GetUseAnim()
     
//============================================================================
//
// GetUseAnim
//
// Returns the animation that the player (or a viking) should play when
// this item is 'used'. 
//============================================================================
 int GetUsePriority()
     
//============================================================================
//
// GetUsePriority
//
// Returns the priority of the weapon, lower is better
//============================================================================
 EMatterType MatterForJoint(int joint)
     
//============================================================
//
// MatterForJoint
//
// Returns what kind of material joint is associated with
//============================================================
 bool UseTrigger(Actor Other)
     
//============================================================================
//
// UseTrigger
//
// When 'used', kegs are destroyed (via a kick animation)
//============================================================================



Source Code


00001	//=============================================================================
00002	// Bucket.
00003	//=============================================================================
00004	class Bucket expands DecorationRune;
00005	
00006	//============================================================================
00007	//
00008	// GetUseAnim
00009	//
00010	// Returns the animation that the player (or a viking) should play when
00011	// this item is 'used'. 
00012	//============================================================================
00013	
00014	function name GetUseAnim()
00015	{
00016		return('Neutral_Kick');
00017	}
00018	
00019	//============================================================================
00020	//
00021	// CanBeUsed
00022	//
00023	// Whether the actor can be used.
00024	//============================================================================
00025	
00026	function bool CanBeUsed(Actor Other)
00027	{
00028		// Can only be used if the player is facing it
00029		if(!Other.ActorInSector(self, ANGLE_45))
00030			return(false);
00031	
00032		if(bDestroyable)
00033			return(true);
00034		else
00035			return(false);
00036	}
00037	
00038	//============================================================================
00039	//
00040	// GetUsePriority
00041	//
00042	// Returns the priority of the weapon, lower is better
00043	//============================================================================
00044	
00045	function int GetUsePriority()
00046	{
00047		return(7);
00048	}
00049	
00050	//============================================================================
00051	//
00052	// UseTrigger
00053	//
00054	// When 'used', kegs are destroyed (via a kick animation)
00055	//============================================================================
00056	
00057	function bool UseTrigger(Actor Other)
00058	{
00059		Momentum = (Location - Other.Location) * 0.25;
00060		Destroy();
00061	}
00062	
00063	//============================================================
00064	//
00065	// MatterForJoint
00066	//
00067	// Returns what kind of material joint is associated with
00068	//============================================================
00069	function EMatterType MatterForJoint(int joint)
00070	{
00071		return MATTER_WOOD;
00072	}
00073	
00074	defaultproperties
00075	{
00076	     bDestroyable=True
00077	     DestroyedSound=Sound'WeaponsSnd.ImpCrashes.crashxbucket01'
00078	     bBurnable=True
00079	     bStatic=False
00080	     DrawType=DT_SkeletalMesh
00081	     CollisionRadius=17.000000
00082	     CollisionHeight=15.000000
00083	     bCollideActors=True
00084	     bCollideWorld=True
00085	     bBlockActors=True
00086	     bBlockPlayers=True
00087	     Skeletal=SkelModel'objects.Bucket'
00088	}

End Source Code