Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionStartAnimation.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(desc: "Prop to be alligned to")]
8 ref SCR_ScenarioFrameworkGet m_PropAllignToGetter;
9
10 [Attribute(params: "agr", desc: "Resource name of the object to be spawned", category: "Asset")]
11 ResourceName m_sGraphName;
12
13 [Attribute(params: "asi", desc: "Resource name of the object to be spawned", category: "Asset")]
14 ResourceName m_GraphInstanceName;
15
16 [Attribute("0", UIWidgets.Auto)]
17 int m_iNPC;
18
19 [Attribute("true", UIWidgets.Auto)]
20 bool m_bRootMotion;
21
22 [Attribute("true", UIWidgets.Auto)]
23 bool m_bHolsterWeapon;
24
25 private bool allignToProp;
26
27 //------------------------------------------------------------------------------------------------
28 override void OnActivate(IEntity object)
29 {
30 if (!CanActivate())
31 return;
32
33 IEntity entity;
34 if (!ValidateInputEntity(object, m_ActorGetter, entity))
35 return;
36
37 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(entity);
38 if (!character)
39 return;
40
41 SCR_CharacterControllerComponent controller = SCR_CharacterControllerComponent.Cast(character.GetCharacterController());
42 if (!controller)
43 return;
44
45 CharacterAnimationComponent animComp = controller.GetAnimationComponent();
46 if (!animComp)
47 return;
48
49 SCR_CharacterCommandHandlerComponent cmdHandler = SCR_CharacterCommandHandlerComponent.Cast(animComp.GetCommandHandler());
50 if (!cmdHandler)
51 return;
52
53 cmdHandler.StartCommand_Move();
54
55 SCR_ScriptedCommandsStaticTable staticTable = cmdHandler.GetScriptedStaticTable();
56 if (!staticTable)
57 return;
58
60
61 animComp.SetVariableInt(staticTable.m_OfficerMissionSpeech, m_iNPC);
62
63 IEntity propEntity;
64 vector vAnimationTransform[4] = { "1 0 0", "0 1 0", "0 0 1", "0 0 0" };
65 allignToProp = false;
66
67 if (m_PropAllignToGetter && ValidateInputEntity(object, m_PropAllignToGetter, propEntity))
68 {
69 propEntity.GetWorldTransform(vAnimationTransform);
70 allignToProp = true;
71
72 }
73
74 customAnimData.m_CustomCommand = staticTable.m_CustomCinematicCommand;
75 customAnimData.m_GraphName = m_sGraphName;
76 customAnimData.m_GraphInstanceName = m_GraphInstanceName;
77 controller.StartLoitering(propEntity, ELoiteringType.CUSTOM, m_bHolsterWeapon, m_bRootMotion, allignToProp, vAnimationTransform, true, customAnimData);
78 }
79}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external void GetWorldTransform(out vector mat[])
See IEntity::GetTransform.
void StartLoitering(IEntity loiterEntity, int loiteringType, bool holsterWeapon, bool allowRootMotion, bool alignToPosition, vector targetPosition[4]={ "1 0 0", "0 1 0", "0 0 1", "0 0 0" }, bool disableInput=false, SCR_LoiterCustomAnimData customAnimData=SCR_LoiterCustomAnimData.Default)
SCR_FieldOfViewSettings Attribute