RuneI
Class Door

source: c:\runehov\RuneI\Classes\Door.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Brush
         |
         +--Engine.Mover
            |
            +--RuneI.Door
Direct Known Subclasses:None

class Door
extends Engine.Mover

//============================================================================= // Door. //=============================================================================

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
//============================================================================



Source Code


00001	//=============================================================================
00002	// Door.
00003	//=============================================================================
00004	class Door extends Mover;
00005	
00006	/*
00007		Description:
00008			Triggered by ragnar kicking it in (Use).  Delay time can be used to wait for anim
00009			Also triggered by taking damage
00010	
00011			Unfinished and unused -- cjr
00012	*/
00013	
00014	//============================================================================
00015	//
00016	// GetUseAnim
00017	//
00018	// Returns the animation that the player (or a viking) should play when
00019	// this item is 'used'.
00020	//============================================================================
00021	
00022	function name GetUseAnim()
00023	{
00024		return('Neutral_Kick');
00025	}
00026	
00027	//============================================================================
00028	//
00029	// CanBeUsed
00030	//
00031	// Whether the actor can be used.
00032	//============================================================================
00033	
00034	function bool CanBeUsed(Actor Other)
00035	{
00036		// Can only be used if the player is facing it
00037		if(!Other.ActorInSector(self, ANGLE_45))
00038			return(false);
00039	
00040		return(true);
00041	}
00042	
00043	//============================================================================
00044	//
00045	// GetUsePriority
00046	//
00047	// Returns the priority of the weapon, lower is better
00048	//============================================================================
00049	
00050	function int GetUsePriority()
00051	{
00052		return(7);
00053	}
00054	
00055	defaultproperties
00056	{
00057	     bTriggerOnceOnly=True
00058	     bUseTriggered=True
00059	     bDamageTriggered=True
00060	     DamageThreshold=30.000000
00061	     DelayTime=0.700000
00062	     InitialState=TriggerToggle
00063	     TransientSoundRadius=1900.000000
00064	}

End Source Code