16class CharacterControllerComponent: PrimaryControllerComponent
21 static proto
void GetAimingSensitivity(out
float mouse, out
float gamepad, out
float ads);
24 static proto
void SetFOVInputCurve(
float mouse,
float gamepad,
float gyro,
float trackIR);
25 static proto
void GetFOVInputCurve(out
float mouse, out
float gamepad, out
float gyro, out
float trackIR);
28 static proto
void SetGyroSensitivity(
float yaw,
float pitch,
float roll);
29 static proto
void GetGyroSensitivity(out
float yaw, out
float pitch, out
float roll);
32 static proto
void SetGyroControl(
bool always,
bool freelook,
bool ads);
33 static proto
void GetGyroControl(out
bool always, out
bool freelook, out
bool ads);
36 static proto
void SetStickyGadget(
bool enable);
39 static proto
void SetStickyADS(
bool enable);
42 static proto
void SetGamepadControlAircraft(
bool enable);
43 static proto
bool GetGamepadControlAircraft();
46 static proto
void SetMouseControlAircraft(
bool enable);
47 static proto
bool GetMouseControlAircraft();
50 static proto
void SetTrackIREnable(
bool enable);
51 static proto
bool GetTrackIREnable();
52 static proto
void SetTrackIRLeaningEnable(
bool enable);
53 static proto
bool GetTrackIRLeaningEnable();
54 static proto
void SetTrackIRFreelookEnable(
bool enable);
55 static proto
bool GetTrackIRFreelookEnable();
56 static proto
void SetTrackIRWhileADSEnable(
bool enable);
57 static proto
bool GetTrackIRWhileADSEnable();
60 static proto
void SetTrackIRFreelookSensitivity(
float sensitivity);
61 static proto
float GetTrackIRFreelookSensitivity();
62 static proto
void SetTrackIRMoveLeaningSensitivity(
float sensitivity);
63 static proto
float GetTrackIRMoveLeaningSensitivity();
64 static proto
void SetTrackIRRollLeaningSensitivity(
float sensitivity);
65 static proto
float GetTrackIRRollLeaningSensitivity();
66 static proto
void SetTrackIRFreelookDeadzoneADS(
float deadzone);
67 static proto
float GetTrackIRFreelookDeadzoneADS();
68 static proto
void SetTrackIRLeaningDeadzone(
float deadzone);
69 static proto
float GetTrackIRLeaningDeadzone();
70 static proto
void SetTrackIRLeaningActiveYawRange(
float range);
71 static proto
float GetTrackIRLeaningActiveYawRange();
86 proto external
void SetHeadingAngle(
float newHeadingAngle,
bool adjustAimingYaw =
false);
94 proto external
void SetThrow(
bool val,
bool cancelThrow);
102 proto external
void SetFreeLook(
bool input,
bool mouse,
bool controller);
252 proto external
bool SetSafety(
bool safety,
bool automatic);
281 proto external
void Ragdoll(
float extend = 0.0);
312 proto external
bool TryUseBandage(
IEntity bandage,
int bodyPart,
float duration = 4.0,
bool bandageSelf =
true);
335 proto external
bool TryUseItem(
IEntity item,
bool allowMovementDuringAction =
false,
bool keepInHandAfterSuccessfulAction =
false);
367 proto external
bool CanUseLadder(
IEntity pLadderOwner,
int ladderComponentIndex = 0,
float maxTestDistance = -1.0,
float maxEntryAngle = -1.0,
bool performTraceCheck =
false);
370 proto external
bool TryUseLadder(
IEntity pLadderOwner,
int ladderComponentIndex = 0,
float maxTestDistance = -1.0,
float maxEntryAngle = -1.0);
440 [
Obsolete(
"This method will be removed soon!")]
func OnControlledByPlayer
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
event void OnPrepareControls()
enum EVehicleType IEntity
ActionManager holds information about states of registered Contexts and Actions.
Adds ability to attach an object to a slot.
enum EPhysicsLayerPresets Ragdoll
proto external AIBaseAimingComponent GetAimingComponent()
proto external bool IsDead()
proto external bool CanDeployWeapon()
proto external int GetInspectState()
event void OnInspectionModeChanged(bool newState)
event bool ShouldGadgetBeDropped(IEntity gadget)
proto external ECharacterLifeState GetLifeState()
proto external bool IsGadgetRaisedModeWanted()
Returns true if character will be (or is) using gadget in raised mode.
proto external bool CanSetDynamicStance(float value)
proto external void SetStanceChange(int stance)
CharacterStanceChange STANCECHANGE_NONE = 0, STANCECHANGE_TOERECTED = 1, STANCECHANGE_TOCROUCH = 2,...
proto external bool CanFire()
void OnItemGestureCancelled()
Triggered if item gesture is cancelled.
proto external vector GetCameraWeaponOffset()
proto external bool ReloadWeapon()
Request weapon reload. If true, request was sucessful.
proto external InventoryStorageManagerComponent GetInventoryStorageManager()
proto external bool TakeGadgetInLeftHand(IEntity gadget, int gadgetType, bool autoFocus=false, bool skipAnimations=false)
proto external bool CanRoll(int val)
proto external float GetObstructionAlpha()
proto external void RemoveGadgetFromHand(bool skipAnimations=false)
Remove held gadget.
proto external bool CanEquipGadget(IEntity gadget)
proto external void SetMovementDirWorld(vector movementDirWorld)
Update simulation state with difference of world position.
event bool SCR_GetDisableMovementControls()
proto external bool SetFireMode(int index)
proto external void SetWeaponADSInput(bool val)
void OnWeaponLoweringStarted()
Will be called when weapon lowering started.
void OnWeaponDropped(IEntity pWeaponEntity, WeaponSlotComponent pWeaponSlot)
Runs after a weapon is dropped from hands. Returns dropped weapon entity and slot that the weapon was...
proto external bool IsChangingItem()
proto external void EnableReviveCharacter(bool enabled)
proto external float GetLastStanceChangeDelay()
proto external bool IsSwimming()
proto external bool IsUnconscious()
proto external bool ReloadWeaponWith(IEntity ammunitionEntity, bool bForceDetach=false)
proto external VoNComponent GetVONComponent()
Get active VON component for transmit.
proto external bool TryStartCharacterGesture(int gesture, int durationMS=0)
Starts character gesture with specified duration in milliseconds (if duration <= 0,...
proto external bool IsPlayingGesture()
proto external void DropItemFromLeftHand()
Makes character drop item from left hand.
proto external void RefreshRagdoll(float fWarmupTime)
proto external bool IsChangingFireMode()
proto external bool CanUseItem()
Returns true if the character can use an item.
proto external bool ShouldHoldInputForRoll()
proto external bool CanEnterUnconsciousness()
proto external float GetLeaning()
Either character wants to lean.
proto external float GetADSTime()
void OnApplyControls(IEntity owner, float timeSlice)
proto external bool IsCharacterStationary()
proto external bool IsMeleeAttack()
proto external float GetStanceChangeDelayTime()
proto external void ForceStanceUp(int stance)
proto external void SetDynamicSpeed(float value)
proto external int GetCurrentMovementPhase()
event bool CanJumpClimb()
proto external void SetPartialLower(bool state)
Sets desired partial lower state, if allowed.
event EHitReactionType ComputeHitReaction(float damageValue, EDamageType damageType)
proto external bool IsLeaning()
proto external bool GetDisableMovementControls()
proto external bool IsFreeLookEnabled()
proto external void EnableHoldInputForRoll(bool enable)
proto external void SetDynamicStance(float value)
event bool CanJumpOutVehicleScript()
Override to handle whether character can eject from vehicle via JumpOut input action.
void OnMeleeDamage(bool started)
Handling of melee events. Sends true if melee started, false, when melee ends.
proto external bool SelectWeapon(BaseWeaponComponent newWeapon)
Set weapon on character with switching animations. If true, the request was successful.
proto external bool GetMeleeAttackInput()
void OnWeaponRaisingFinished()
Will be called when weapon raising finished.
proto external ECharacterStance GetStance()
Returns the current stance of the character.
proto external bool GetIsWeaponDeployed()
proto external bool IsChangingStance()
proto external bool IsUsingItem()
proto external bool GetWeaponADSInput()
proto external bool IsPlayerControlled()
proto external bool SetMuzzle(int index)
proto external float GetMovementSpeed()
proto external float GetVehicleRagdollSpeedMsSq()
proto external void SetDisableViewControls(bool other)
proto external void SetFireWeaponWanted(bool val)
Set wanted input action values.
proto external bool IsFreeLookEnforced()
Returns true if freelook is enforced by game logic.
void OnConsciousnessChanged(bool conscious)
Will be called when the consciousness of the character changes.
bool OnPerformAction()
Override to handle what happens after pressing F button, return false to use default cpp behavior.
proto external void SetDisableWeaponControls(bool other)
proto external bool DetachCurrentMagazine()
proto external void SetHeadingAngle(float newHeadingAngle, bool adjustAimingYaw=false)
proto external bool SetSafety(bool safety, bool automatic)
proto external void DropWeapon(WeaponSlotComponent weaponSlot)
Makes character drop weapon from the weapon slot given by parameter.
proto external float GetCurrentLeanAmount()
Returns current amount of leaning applied.
proto external bool GetInspect()
proto external bool CanPlayItemGesture()
Returns true if the character can play a gesture.
proto external bool IsFalling()
proto external bool IsTrackIREnabled()
proto external bool IsAdjustingLeaning()
proto external bool GetIsWeaponDeployedBipod()
proto external EntitySlotInfo GetRightHandPointInfo()
proto external void StopCharacterGesture()
proto external IEntity GetCurrentItemInHands()
proto external void SetJump(float val)
void OnGadgetFocusStateChanged(IEntity gadget, bool isFocused)
Will be called when gadget fully transitioned to or canceled focus mode.
proto external bool IsClosingVehicleDoor()
proto external bool IsSprinting()
proto external bool GetFreeLookMouse()
proto external void SetUnconscious(bool enabled)
proto external bool IsClimbing()
proto external void SetBanking(float val)
void OnWeaponRaisingStarted()
Will be called when weapon raising started.
proto external CharacterAnimationComponent GetAnimationComponent()
proto external IEntity GetInspectEntity()
proto external bool GetCanThrow()
event bool GetCanMeleeAttack()
proto external CharacterHeadAimingComponent GetHeadAimingComponent()
proto external void ForceDeath()
Kills the character. Skips invincibility checks.
proto external void SetWantedLeaning(float val)
proto external void ForceStance(int stance)
proto external bool CanUseLadder(IEntity pLadderOwner, int ladderComponentIndex=0, float maxTestDistance=-1.0, float maxEntryAngle=-1.0, bool performTraceCheck=false)
event float GetInspectTargetLookAt(out vector targetAngles)
proto external void SetInspect(IEntity targetItem)
proto external bool TryUseBandage(IEntity bandage, int bodyPart, float duration=4.0, bool bandageSelf=true)
event void UpdateDrowning(float timeSlice, vector waterLevel)
proto external float GetStamina()
void OnGadgetStateChanged(IEntity gadget, bool isInHand, bool isOnGround)
Will be called when gadget taken/removed from hand.
event bool CanGetOutVehicleScript()
Override to handle whether character can get out of vehicle via GetOut input action.
proto external bool CanChangeStance(int stance)
CharacterStanceChange STANCECHANGE_NONE = 0, STANCECHANGE_TOERECTED = 1, STANCECHANGE_TOCROUCH = 2,...
proto external EntitySlotInfo GetLeftHandPointInfo()
proto external bool CanEngageChangeItem()
proto external bool IsFreeLookForced()
proto external bool CanInspect(IEntity targetItem)
proto external void SetWeaponRaised(bool val)
Set the current weapon-raised state.
proto external bool GetIsSprintingToggle()
proto external bool ReplaceEquippedItem(IEntity item)
Changes item currently equipped weapon slot and puts the previous one into the inventory....
proto external void SetShouldApplyDynamicSpeedOverride(bool shouldApply)
proto external void SetThrow(bool val, bool cancelThrow)
Set wanted input action values.
void OnWeaponLoweringFinished()
Will be called when weapon lowering finished.
event bool ShouldAligningAdjustAimingAngles()
proto external vector GetMovementInput()
proto external CharacterInputContext GetInputContext()
proto external bool IsPlayingItemGesture()
Returns true if the character is playing a gesture.
proto external void OverrideMaxSpeed(float fraction)
proto external bool TryUseLadder(IEntity pLadderOwner, int ladderComponentIndex=0, float maxTestDistance=-1.0, float maxEntryAngle=-1.0)
void OnDiag(IEntity owner, float timeslice)
proto external CharacterStaminaComponent GetStaminaComponent()
proto external bool TryPlayItemGesture(EItemGesture gesture, BaseUserAction callbackAction=null, string confirmEvent="")
proto external bool IsGadgetInHands()
Returns true if there is a gadget in hands.
proto external bool GetCanFireWeapon()
proto external bool TryRecoverLastRightHandItem(bool swap=false, BaseUserAction callbackAction=null)
proto external bool CanPartialLower()
Returns true if the character can partially lower (weapon).
proto external bool IsWeaponRaised()
proto external bool GetInspectCurrentWeapon()
event bool GetCanEquipGadget(IEntity gadget)
proto external bool GetDisableWeaponControls()
proto external bool TryUseItem(IEntity item, bool allowMovementDuringAction=false, bool keepInHandAfterSuccessfulAction=false)
proto external vector GetVelocity()
proto external bool GetPositionInView(vector pos, float angMax)
proto external float GetDynamicSpeed()
proto external void SetFreeLook(bool input, bool mouse, bool controller)
proto external void ResetPersistentStates(bool resetADSState=true, bool resetGadgetState=true)
proto external void SetMeleeAttack(bool val)
proto external EWeaponObstructedState GetWeaponObstructedState()
proto external bool IsPartiallyLowered()
Returns true if the character is partially lowered.
proto external vector GetMovementDirWorld()
proto external bool GetFreeLookController()
proto external bool IsOpeningVehicleDoor()
proto external bool IsRoll()
proto external IEntity GetAttachedGadgetAtLeftHandSlot()
proto external AIControlComponent GetAIControlComponent()
proto external bool IsFocusMode()
proto external bool TryEquipRightHandItem(IEntity item, EEquipItemType type, bool swap=false, BaseUserAction callbackAction=null)
event bool IsUsingBinoculars()
proto external bool GetDisableViewControls()
event void OnAnimationEvent(AnimationEventID animEventType, AnimationEventID animUserString, int intParam, float timeFromStart, float timeToEnd)
proto external void SetSightsRange(int index)
void OnReloaded(IEntity owner, BaseWeaponComponent weapon)
proto external SCR_ChimeraCharacter GetCharacter()
Returns the current controlled character.
proto external float GetJumpSpeed()
proto external bool IsReloading()
proto external void RecoverHiddenGadget(bool respectSettings, bool skipAnims)
Put held gadget on hold.
proto external void SetInThirdPersonView(bool state)
event bool SCR_GetDisableViewControls()
proto external void SetWeaponNoFireTime(float t)
proto external void SetForcedFreeLook(bool enabled)
Force character to stay in freelook.
void OnItemDroppedFromLeftHand(IEntity pItemEntity)
Runs after the left hand item is dropped. Returns dropped item entity.
proto external bool SetGadgetRaisedModeWanted(bool newRaised)
Returns true if focus will be changed to requested.
proto external IEntity GetRightHandItem()
Returns generic item attached to right hand. Returns null if there's none (or if active item is weapo...
proto external void GetWeaponModifiers(float baseScale, float moveScale, out vector scaleA, out vector scaleB)
proto external vector GetMovementVelocity()
proto external void SetInspectState(int state)
proto external bool CanReviveCharacter()
event void SCR_OnDisabledJumpAction()
proto external void SetWeaponADS(bool val)
Set the current weapon ADS state.
proto external bool TryUseItemOverrideParams(notnull ItemUseParameters params)
proto external BaseWeaponManagerComponent GetWeaponManagerComponent()
proto external bool IsInThirdPersonView()
proto external void SetDisableMovementControls(bool other)
proto external void SetMovement(float movementSpeed, vector movementDirModel)
Update animation about state of movement, define speed and direction in local space of character.
proto external float GetVehicleRagdollSpeed()
proto external bool GetFreeLookInput()
proto external float GetDynamicStance()
proto external void RequestActionByID(int actionID, float value)
CharacterControllerComponentClass PrimaryControllerComponentClass SetAimingSensitivity(float mouse, float gamepad, float ads)
proto external CameraHandlerComponent GetCameraHandlerComponent()
proto external void SetRoll(int val)
2 - right, 1 - left
proto external float GetWantedLeaning()
proto external bool IsWeaponADS()
proto external void StopDeployment()