G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UInputComponent Class Reference

Implement an Actor component for input bindings. More...

Public Member Functions

Functions
void GetControllerMouseDelta (float32 &DeltaX, float32 &DeltaY) const
 Retrieves how far the mouse moved this frame.
void BindAxis (FName AxisName, FInputAxisHandlerDynamicSignature Delegate=FInputAxisHandlerDynamicSignature())
 Bind a function to be called whenever a float axis bound to the specified axis name is changed. Specified function must be a UFUNCTION() and takes a single float as its argument.
void BindAxisKey (FName AxisKey, FInputAxisHandlerDynamicSignature Delegate=FInputAxisHandlerDynamicSignature())
 Bind a function to be called whenever an axis specified by the given key changes. This bypasses any action bindings setup in project settings. Specified function must be a UFUNCTION() and takes a single float as its argument.
void BindChord (FInputChord Chord, EInputEvent KeyEvent, FInputActionHandlerDynamicSignature Delegate=FInputActionHandlerDynamicSignature())
 Bind a specific key chord to a delegate. This bypasses any action bindings setup in project settings. Specified function must be a UFUNCTION() and takes a single FKey as its argument.
void BindKey (FKey Key, EInputEvent KeyEvent, FInputActionHandlerDynamicSignature Delegate=FInputActionHandlerDynamicSignature(), bool bConsumeInput=true)
 Bind a specific key to a delegate. This bypasses any action bindings setup in project settings. Specified function must be a UFUNCTION() and takes a single FKey as its argument.
void BindVectorAxis (FKey AxisKey, FInputVectorAxisHandlerDynamicSignature Delegate=FInputVectorAxisHandlerDynamicSignature())
 Bind a function to be called whenever a vector axis specified by the given key changes. Specified function must be a UFUNCTION() and takes a single FVector as its argument. GB.GestureDelegate = FInputGestureUnifiedDelegate(Delegate);.
float32 GetControllerAnalogKeyState (FKey Key) const
 Returns the analog value for the given key/button. If analog isn't supported, returns 1 for down and 0 for up.
void GetControllerAnalogStickState (EControllerAnalogStick WhichStick, float32 &StickX, float32 &StickY) const
 Retrieves the X and Y displacement of the given analog stick. For WhickStick, 0 = left, 1 = right.
float32 GetControllerKeyTimeDown (FKey Key) const
 Returns how long the given key/button has been down. Returns 0 if it's up or it just went down this frame.
void BindAction (FName ActionName, EInputEvent KeyEvent, FInputActionHandlerDynamicSignature Delegate=FInputActionHandlerDynamicSignature())
 Bind a function to be called when a key bound to this action triggers a specific keyevent. Specified function must be a UFUNCTION() and takes a single FKey as its argument.
FVector GetControllerVectorKeyState (FKey Key) const
 Returns the vector value for the given key/button.
void GetTouchState (int FingerIndex, float32 &LocationX, float32 &LocationY, bool &bIsCurrentlyPressed) const
 Returns the location of a touch, and if it's held down.
bool IsControllerKeyDown (FKey Key) const
 Returns true if the given key/button is pressed on the input of the controller (if present).
bool WasControllerKeyJustPressed (FKey Key) const
 Returns true if the given key/button was up last frame and down this frame.
bool WasControllerKeyJustReleased (FKey Key) const
 Returns true if the given key/button was down last frame and up this frame.
Public Member Functions inherited from UActorComponent
void Tick (float32 DeltaSeconds)
 Event called every frame if tick is enabled.
EComponentCreationMethod GetComponentCreationMethod () const
void SetbIsEditorOnly (bool Value)
void EndPlay (EEndPlayReason EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
void BeginPlay ()
 Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay.
void MarkRenderStateDirty ()
bool HasBegunPlay () const
void SetbTickInEditor (bool Value)
bool IsVisualizationComponent () const
void SetIsVisualizationComponent (bool Value)
void AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds)
 Event called every async physics tick if bAsyncPhysicsTickEnabled is true.
bool GetbReplicateUsingRegisteredSubObjectList () const
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
void SetbReplicateUsingRegisteredSubObjectList (bool Value)
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
bool GetbReplicates () const
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
void SetbReplicates (bool Value)
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
bool GetbAutoActivate () const
 Whether the component is activated at creation or must be explicitly activated.
void SetbAutoActivate (bool Value)
 Whether the component is activated at creation or must be explicitly activated.
void SetbEditableWhenInherited (bool Value)
 True if this component can be modified when it was inherited from a parent actor class.
void SetbCanEverAffectNavigation (bool Value)
 Whether this component can potentially influence navigation.
bool GetbIsEditorOnly () const
 If true, the component will be excluded from non-editor builds.
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components).
void DestroyComponent (UObject Object)
 Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function.
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag.
AActor GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component.
void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. Only safe during construction scripts.
bool IsActive () const
 Returns whether the component is active or not.
void ToggleActive ()
 Toggles the active state of the component.
void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not.
void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes.
void Deactivate ()
 Deactivates the SceneComponent.
float32 GetComponentTickInterval () const
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
void AddTickPrerequisiteActor (AActor PrerequisiteActor)
 Make this component tick after PrerequisiteActor.
void AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
void RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not.
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component.
void RemoveTickPrerequisiteActor (AActor PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
void SetComponentTickIntervalAndCooldown (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.
void SetComponentTickInterval (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick.
void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UInputComponent Get (const AActor Actor, FName WithName=NAME_None)
static UInputComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UInputComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UActorComponent
static UActorComponent Get (const AActor Actor, FName WithName=NAME_None)
static UActorComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UActorComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Additional Inherited Members

Public Attributes inherited from UActorComponent
bool bAutoActivate
 Whether the component is activated at creation or must be explicitly activated.
TArray< TObjectPtr< UAssetUserData > > AssetUserData
 Array of user data stored with the component.
TArray< TObjectPtr< UAssetUserData > > AssetUserDataEditorOnly
 Array of user data stored with the component.
bool bReplicates
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component.
bool bIsEditorOnly
 If true, the component will be excluded from non-editor builds.
bool bReplicateUsingRegisteredSubObjectList
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
const EComponentCreationMethod ComponentCreationMethod
const AActor Owner
 Follow the Outer chain to get the AActor that 'Owns' this component.
FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated.
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset.
float32 ComponentTickInterval
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

Implement an Actor component for input bindings.

An Input Component is a transient component that enables an Actor to bind various forms of input events to delegate functions. Input components are processed from a stack managed by the PlayerController and processed by the PlayerInput. Each binding can consume the input event preventing other components on the input stack from processing the input.

@see https://docs.unrealengine.com/latest/INT/Gameplay/Input/index.html

Member Function Documentation

◆ BindAction()

void BindAction ( FName ActionName,
EInputEvent KeyEvent,
FInputActionHandlerDynamicSignature Delegate = FInputActionHandlerDynamicSignature ( ) )

Bind a function to be called when a key bound to this action triggers a specific keyevent. Specified function must be a UFUNCTION() and takes a single FKey as its argument.

◆ BindAxis()

void BindAxis ( FName AxisName,
FInputAxisHandlerDynamicSignature Delegate = FInputAxisHandlerDynamicSignature ( ) )

Bind a function to be called whenever a float axis bound to the specified axis name is changed. Specified function must be a UFUNCTION() and takes a single float as its argument.

◆ BindAxisKey()

void BindAxisKey ( FName AxisKey,
FInputAxisHandlerDynamicSignature Delegate = FInputAxisHandlerDynamicSignature ( ) )

Bind a function to be called whenever an axis specified by the given key changes. This bypasses any action bindings setup in project settings. Specified function must be a UFUNCTION() and takes a single float as its argument.

◆ BindChord()

void BindChord ( FInputChord Chord,
EInputEvent KeyEvent,
FInputActionHandlerDynamicSignature Delegate = FInputActionHandlerDynamicSignature ( ) )

Bind a specific key chord to a delegate. This bypasses any action bindings setup in project settings. Specified function must be a UFUNCTION() and takes a single FKey as its argument.

◆ BindKey()

void BindKey ( FKey Key,
EInputEvent KeyEvent,
FInputActionHandlerDynamicSignature Delegate = FInputActionHandlerDynamicSignature ( ),
bool bConsumeInput = true )

Bind a specific key to a delegate. This bypasses any action bindings setup in project settings. Specified function must be a UFUNCTION() and takes a single FKey as its argument.

◆ BindVectorAxis()

void BindVectorAxis ( FKey AxisKey,
FInputVectorAxisHandlerDynamicSignature Delegate = FInputVectorAxisHandlerDynamicSignature ( ) )

Bind a function to be called whenever a vector axis specified by the given key changes. Specified function must be a UFUNCTION() and takes a single FVector as its argument. GB.GestureDelegate = FInputGestureUnifiedDelegate(Delegate);.

◆ Create()

UInputComponent Create ( AActor Actor,
FName WithName = NAME_None )
static

◆ Get()

UInputComponent Get ( const AActor Actor,
FName WithName = NAME_None )
static

◆ GetControllerAnalogKeyState()

float32 GetControllerAnalogKeyState ( FKey Key) const

Returns the analog value for the given key/button. If analog isn't supported, returns 1 for down and 0 for up.

◆ GetControllerAnalogStickState()

void GetControllerAnalogStickState ( EControllerAnalogStick WhichStick,
float32 & StickX,
float32 & StickY ) const

Retrieves the X and Y displacement of the given analog stick. For WhickStick, 0 = left, 1 = right.

◆ GetControllerKeyTimeDown()

float32 GetControllerKeyTimeDown ( FKey Key) const

Returns how long the given key/button has been down. Returns 0 if it's up or it just went down this frame.

◆ GetControllerMouseDelta()

void GetControllerMouseDelta ( float32 & DeltaX,
float32 & DeltaY ) const

Retrieves how far the mouse moved this frame.

◆ GetControllerVectorKeyState()

FVector GetControllerVectorKeyState ( FKey Key) const

Returns the vector value for the given key/button.

◆ GetOrCreate()

UInputComponent GetOrCreate ( AActor Actor,
FName WithName = NAME_None )
static

◆ GetTouchState()

void GetTouchState ( int FingerIndex,
float32 & LocationX,
float32 & LocationY,
bool & bIsCurrentlyPressed ) const

Returns the location of a touch, and if it's held down.

◆ IsControllerKeyDown()

bool IsControllerKeyDown ( FKey Key) const

Returns true if the given key/button is pressed on the input of the controller (if present).

◆ StaticClass()

UClass StaticClass ( )
static

◆ WasControllerKeyJustPressed()

bool WasControllerKeyJustPressed ( FKey Key) const

Returns true if the given key/button was up last frame and down this frame.

◆ WasControllerKeyJustReleased()

bool WasControllerKeyJustReleased ( FKey Key) const

Returns true if the given key/button was down last frame and up this frame.