Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkWaypointAnimation.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3class SCR_ScenarioFrameworkWaypointAnimation : SCR_ScenarioFrameworkWaypointScripted
4{
5 [Attribute(defvalue: "{4481F98AAFA79B1C}Prefabs/AI/Waypoints/AIWaypoint_Animation.et", desc: "In Default, it will use specific prefab for each class, but here you can change it if you know what you are doing")]
6 ResourceName m_sWaypointPrefab;
7
8 [Attribute(defvalue: EAIWaypointCompletionType.Any.ToString(), UIWidgets.ComboBox, "AI Waypoint Completion Type", "", ParamEnumArray.FromEnum(EAIWaypointCompletionType))]
9 EAIWaypointCompletionType m_eAIWaypointCompletionType;
10
11 [Attribute("0", UIWidgets.SpinBox, "Waypoint priority level", "0 2000 1000")]
12 float m_fPriorityLevel;
13
14 [Attribute("", UIWidgets.Object, "Animation methods")]
15 ref SCR_AIAnimation_Base m_AnimationClass;
16
17 [Attribute("-1", UIWidgets.SpinBox, "For how long the animation should be performed. -1 means infinit.", params: "-1 inf")]
18 float m_fAnimationDuration;
19
20 [Attribute("", UIWidgets.Object, "Animation position and angles - use PointInfo")]
21 ref PointInfo m_AnimationLocalTransform;
22 //------------------------------------------------------------------------------------------------
23 override void SetupWaypoint(IEntity waypointEntity)
24 {
25 super.SetupWaypoint(waypointEntity);
26
27 SCR_AIAnimationWaypoint animationWaypoint = SCR_AIAnimationWaypoint.Cast(waypointEntity);
28 if (!animationWaypoint)
29 return;
30
31 vector vAnimationLocalTransform[4];
32 if (m_AnimationLocalTransform)
33 m_AnimationLocalTransform.GetLocalTransform(vAnimationLocalTransform);
34
35 SCR_AIAnimationScript animationScript = new SCR_AIAnimationScript();
36 SCR_AIAnimationWaypointParameters animationParameters = new SCR_AIAnimationWaypointParameters();
37
38 animationParameters.SetParameters(vAnimationLocalTransform, m_fAnimationDuration, m_AnimationClass);
39 animationScript.AddAnimationWaypointParameter(animationParameters, 0);
40 animationWaypoint.AddAnimationScript(animationScript);
41 }
42
43 //------------------------------------------------------------------------------------------------
44 override void SetWaypointCompletionType(EAIWaypointCompletionType type)
45 {
46 m_eAIWaypointCompletionType = type;
47 }
48
49 //------------------------------------------------------------------------------------------------
50 override EAIWaypointCompletionType GetWaypointCompletionType()
51 {
52 return m_eAIWaypointCompletionType;
53 }
54
55 //------------------------------------------------------------------------------------------------
56 override void SetWaypointPriorityLevel(float priority)
57 {
58 m_fPriorityLevel = priority;
59 }
60
61 //------------------------------------------------------------------------------------------------
62 override float GetWaypointPriorityLevel()
63 {
64 return m_fPriorityLevel;
65 }
66
67 //------------------------------------------------------------------------------------------------
68 override void SetWaypointPrefab(ResourceName prefab)
69 {
70 m_sWaypointPrefab = prefab;
71 }
72
73 //------------------------------------------------------------------------------------------------
74 override ResourceName GetWaypointPrefab()
75 {
76 return m_sWaypointPrefab;
77 }
78}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
PointInfo - allows to define position.
Definition PointInfo.c:9
void AddAnimationWaypointParameter(notnull SCR_AIAnimationWaypointParameters animationWaypointParameter, int animationIndex)
void AddAnimationScript(notnull SCR_AIAnimationScript animationScript, int animationIndex=-1)
SCR_FieldOfViewSettings Attribute