Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.AnimNotify_PlayFaceFXAnim


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
/**
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 * Play a facial animation on a character.
 */

class AnimNotify_PlayFaceFXAnim extends AnimNotify_Scripted;

/** Reference to FaceFX AnimSet package the animation is in */
var()	FaceFXAnimSet	FaceFXAnimSetRef;
var()	String			GroupName;
var()	String			AnimName;

/** If a FaceFX animation is already playing, then override if TRUE, skip is FALSE */
var() bool		bOverridePlayingAnim;
/** Chance to play. 0 - 1.f */
var() float		PlayFrequency;

event Notify(Actor Owner, AnimNodeSequence AnimSeqInstigator)
{
	// If this animation doesn't play all the time
	// See if we should play or ignore it!
	if( PlayFrequency < 1.f )
	{
		if( FRand() > PlayFrequency )
		{
			return;
		}
	}
	else if( PlayFrequency > 1.f )
	{
		LogInternal("Play FaceFX animation from notify" @ AnimSeqInstigator.AnimSeqName @ "for" @ Owner @ "GroupName:" @ GroupName @ "AnimName:" @ AnimName);
		LogInternal(" PlayFrequency > 1.0 is useless. Chance to play valid range is from 0.0 to 1.0.");
	}

	if( Owner != None )
	{
		//`log(Self @ "Play FaceFX animation from notify" @ AnimSeqInstigator.AnimSeqName @ "for" @ Owner @ "GroupName:" @ GroupName @ "AnimName:" @ AnimName @ "(bOverridePlayingAnim:"$ bOverridePlayingAnim @ "IsActorPlayingFaceFXAnim:" $ Owner.IsActorPlayingFaceFXAnim() $")");

		// If a Face FX animation is already playing, should we override it?
		if( !bOverridePlayingAnim && Owner.IsActorPlayingFaceFXAnim() )
		{
			return;
		}

		Owner.PlayActorFaceFXAnim(FaceFXAnimSetRef, GroupName, AnimName);
	}
}

defaultproperties
{
   bOverridePlayingAnim=True
   PlayFrequency=1.000000
   Name="Default__AnimNotify_PlayFaceFXAnim"
   ObjectArchetype=AnimNotify_Scripted'Engine.Default__AnimNotify_Scripted'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:18:30.000 - Creation time: sk 18-3-2018 10:01:05.014 - Created with UnCodeX