Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionStartSimpleAnimation.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Entity to play animation on")]
5 ref SCR_ScenarioFrameworkGet m_ActorGetter;
6
7 [Attribute(params: "anm", desc: "Resource name of the animation", category: "Asset")]
8 ResourceName m_sAnimName;
9
10 [Attribute("0", UIWidgets.Auto)]
11 int m_iStartTime;
12
13 [Attribute("1", UIWidgets.Auto)]
14 float m_fSpped;
15
16 [Attribute("false", UIWidgets.Auto)]
17 bool m_bLoop;
18
19 //------------------------------------------------------------------------------------------------
20 override void OnActivate(IEntity object)
21 {
22 if (!CanActivate())
23 return;
24
25 IEntity entity;
26 if (!ValidateInputEntity(object, m_ActorGetter, entity))
27 return;
28
29 AnimationPlayerComponent animationComponent = AnimationPlayerComponent.Cast(entity.FindComponent(AnimationPlayerComponent));
30 if (!animationComponent)
31 {
32 if (object)
33 PrintFormat("ScenarioFramework Action: Animation component not found for Action %1 attached on %2.", this, object.GetName(), level: LogLevel.ERROR);
34 else
35 PrintFormat("ScenarioFramework Action: Animation component not found for Action %1.", this, level: LogLevel.ERROR);
36
37 return;
38 }
39
40 animationComponent.Prepare(m_sAnimName, m_iStartTime, m_fSpped, m_bLoop);
41 animationComponent.Play();
42 }
43}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute