Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00057 00058 00059 00060 |
class ACTION_PlayAnim extends ScriptedAction; var(Action) name BaseAnim; var(Action) float BlendInTime; var(Action) float BlendOutTime; var(Action) float AnimRate; var(Action) byte AnimIterations; var(Action) bool bLoopAnim; var(Action) float StartFrame; function bool InitActionFor(ScriptedController C) { // play appropriate animation C.AnimsRemaining = AnimIterations; if ( PawnPlayBaseAnim(C,true) ) C.CurrentAnimation = self; return false; } function SetCurrentAnimationFor(ScriptedController C) { if ( C.Pawn.IsAnimating(0) ) C.CurrentAnimation = self; else C.CurrentAnimation = None; } function bool PawnPlayBaseAnim(ScriptedController C, bool bFirstPlay) { if ( BaseAnim == '' ) return false; C.bControlAnimations = true; if ( bFirstPlay ) C.Pawn.PlayAnim(BaseAnim,AnimRate,BlendInTime); else if ( bLoopAnim || (C.AnimsRemaining > 0) ) C.Pawn.LoopAnim(BaseAnim,AnimRate); else return false; if( StartFrame > 0.0 ) C.Pawn.SetAnimFrame( StartFrame, 0, 1); return true; } function string GetActionString() { return ActionString@BaseAnim; } defaultproperties { BlendInTime=0.200000 BlendOutTime=0.200000 AnimRate=1.000000 ActionString="play animation" bValidForTrigger=Falsch } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |