15 [
Attribute( defvalue:
"0", uiwidget: UIWidgets.EditBox,
desc:
"Provide index of related SmartActionSentinel" )]
16 protected int m_iSmartActionId;
21 protected vector m_targetPosition[4]
34 vector desiredPos = mat[3] + smartAction.GetActionOffset().Multiply3(mat);
37 vector desiredLookPos = mat[3] + smartAction.GetLookPosition().Multiply3(mat);
40 vector actionEntityUp = mat[1];
43 Math3D.DirectionAndUpMatrix(desiredLookPos - desiredPos, actionEntityUp, loiteringPosition);
46 loiteringPosition[3] = desiredPos;
60 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(pUserEntity);
78 bool stopFast =
false;
79 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(pUserEntity);
87 AIControlComponent aiController = controller.GetAIControlComponent();
106 return !m_Occupant || m_Occupant == user;
112 outName = (
"#AR-UserAction_Loiter");
150 array<Managed> aComponents = {};
153 m_isValid = aComponents.IsIndexValid(m_iSmartActionId);
156 Print(
string.Format(
"Invalid SmartAction id at SCR_LoiterUserAction! Components=%1, id=%2", aComponents.Count(), m_iSmartActionId),
LogLevel.WARNING);
177 writer.WriteInt((
int)smartAction.GetLoiterAnimation());
178 writer.WriteBool(smartAction.GetHolsterWeapon());
180 writer.WriteVector(m_targetPosition[0]);
181 writer.WriteVector(m_targetPosition[1]);
182 writer.WriteVector(m_targetPosition[2]);
183 writer.WriteVector(m_targetPosition[3]);
201 for (
int i = 0; i < 4; i++)
204 reader.ReadVector(value);
205 m_targetPosition[i] = value;
ELoiteringType m_eLoiteringType
override bool CanBroadcastScript()
override bool CanBeShownScript(IEntity user)
override bool CanBePerformedScript(IEntity user)
void GetLoiteringPosition(SCR_AISmartActionSentinelComponent smartAction, out vector loiteringPosition[4])
Calculates the position of loitering.
override bool GetActionNameScript(out string outName)
override bool CheckOnServerFirstScript()
override bool HasLocalEffectOnlyScript()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
bool OnLoadActionData(ScriptBitReader reader)
proto external IEntity GetOwner()
Returns the parent entity of this action.
bool OnSaveActionData(ScriptBitWriter writer)
proto external void GetWorldTransform(out vector mat[])
See IEntity::GetTransform.
proto external int FindComponents(typename typeName, notnull array< Managed > outComponents)
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)
bool IsLoiteringOnEntity(IEntity entity)
void StopLoitering(bool terminateFast)
bool ShouldAbortLoiterFast()
bool LoadOccupant(ScriptBitReader reader)
void StopAction(IEntity pUserEntity)
bool SaveOccupant(ScriptBitWriter writer)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
@ NONE
When Shape is created and not initialized yet.
SCR_FieldOfViewSettings Attribute
@ CUSTOM
Mesh created through MeshObject::Create.