7 [
Attribute(
"1",
desc:
"If action is Continuous and duration is less than 0 than the UI process bar goes to 0 again if it reaches the perform action amount")]
10 [
Attribute(
"0.25",
desc:
"If action is looping this will be used to delay the action after it reaches 100% to prevent the action from instantly looping",
params:
"0 inf")]
13 [
Attribute(
"0",
desc:
"Using this action should automatically lower player weapon")]
16 [
Attribute(
"0",
desc:
"When can the action be shown regarding the vehicle you are in. Note only checked for vehicle that the action is attached to. IGNORE will never check vehicle state", uiwidget:
UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EUserActionInVehicleState))]
19 [
Attribute(
"1",
desc:
"Whether this action can only be performed by occupants of the same vehicle (if in vehicle)", uiwidget:
UIWidgets.CheckBox)]
59 case EUserActionInVehicleState.NOT_IN_VEHICLE :
67 case EUserActionInVehicleState.IN_VEHICLE_ANY :
75 case EUserActionInVehicleState.IN_VEHICLE_PILOT :
83 case EUserActionInVehicleState.IN_VEHICLE_CARGO :
91 case EUserActionInVehicleState.IN_VEHICLE_TURRET :
113 CompartmentAccessComponent userCompAccess;
118 userCompAccess = userCharacter.GetCompartmentAccessComponent();
120 userCompAccess = CompartmentAccessComponent.Cast(user.FindComponent(CompartmentAccessComponent));
126 CompartmentAccessComponent ownerAccess = CompartmentAccessComponent.Cast(owner.
FindComponent(CompartmentAccessComponent));
134 IEntity userVehicle = userCompAccess.GetVehicleIn(user);
135 return userVehicle == vehicle;
139 IEntity userVehicle = userCompAccess.GetVehicleIn(user);
140 IEntity ownerVehicle = ownerAccess.GetVehicleIn(owner);
141 return userVehicle == ownerVehicle;
181 bool bLoopDone =
false;
203 fProgress = fProgress + timeSlice;
211 fProgress =
Math.Min(
Math.Mod(fProgress, totalDuration), actionDuration);
254 RplComponent rplComp = RplComponent.Cast(pUserEntity.
FindComponent(RplComponent));
255 if (rplComp && !rplComp.IsOwner())
263 CharacterControllerComponent contr =
character.GetCharacterController();
267 if (contr.CanPartialLower() && !contr.IsPartiallyLowered())
268 contr.SetPartialLower(
true);
275enum EUserActionInVehicleState
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_ScriptedUserAction IN_VEHICLE_CARGO
SCR_ScriptedUserAction IN_VEHICLE_ANY
func UserActionEventListener
SCR_ScriptedUserAction IN_VEHICLE_TURRET
SCR_ScriptedUserAction IN_VEHICLE_PILOT
SCR_ScriptedUserAction NOT_IN_VEHICLE
proto external bool ShouldPerformPerFrame()
Should this action be performed every frame the input action is triggered?
proto external UserActionContext GetActiveContext()
Getter for m_pActiveContext.
proto external float GetActionDuration()
Returns the duration of this action in seconds.
proto external IEntity GetOwner()
Returns the parent entity of this action.
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
proto external vector CoordToLocal(vector coord)
static IEntity GetLocalControlledEntity()
A scripted action class having optional logic to check if vehicle is valid.
CompartmentAccessComponent compAccess
bool LoopActionUpdate(float timeSlice)
ChimeraCharacter character
UserActionContext m_LastUserActionContext
Get action local position Used for such things like playing audio at the correct location on action use return action local position *vector GetLocalPositionAction()
override void OnActionStart(IEntity pUserEntity)
bool IsSameVehicleOrNone(notnull IEntity user)
float GetLoopActionHoldDuration()
vector GetWorldPositionAction()
float m_fLoopActionHoldDuration
bool isCharacterInVehicle
override float GetActionProgressScript(float fProgress, float timeSlice)
override void OnActionSelected()
float m_fLoopProgressSmoothVelocity
EUserActionInVehicleState m_eShownInVehicleState
enum EPhysicsLayerPresets Vehicle
SCR_FieldOfViewSettings Attribute
@ IGNORE
Ignore any parent and always create root record.