|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Ability Task with generic Delegates for success, failure, cancel. More...
Public Member Functions | |
Functions | |
| FInGameTime | GetInGameTimeNow () const |
| Returns the current InGame-Time (fast-forwarded when the player sleeps). | |
| void | HandleAvatarChanged () |
| Called when the Character this state belongs to was spawned or despawned. | |
| void | OnExternalCancel () |
| Override to decide what should happen when your task got cancelled from outside. | |
| void | EndTaskAsCancelled () |
| Call this instead of EndTask() to signal the task was cancelled. | |
| void | EndTaskAsFailure () |
| Call this instead of EndTask() to signal the task having failed. | |
| void | EndTaskAsSuccess () |
| Call this instead of EndTask() to signal the task ending successfully. | |
| void | EndTaskWithResult (EGenericTaskResult Result) |
| Call this instead of EndTask() to signal the task having failed. | |
| AGothicAIController | GetAvatarAIController () const |
| If the avatar is controlled by an AIController, returns it. Nullptr otherwise. | |
| AGothicCharacter | GetAvatarCharacter () const |
| If the avatar is a GothicCharacter, returns it. Nullptr otherwise. | |
| AGothicCharacterState | GetAvatarCharacterState () const |
| If the avatar is a GothicCharacter, returns its CharacterState. Nullptr otherwise. | |
| AGothicNPCState | GetAvatarNPCState () const |
| If the avatar is a n NPC, returns its NPCState. Nullptr otherwise. | |
| APlayerController | GetAvatarPlayerController () const |
| If the avatar is controlled by a PlayerController, returns it. Nullptr otherwise. | |
| void | ExternalCancel () |
| FInGameTime | GetRuntimeInGame () const |
| How long this task has been running for (in InGame-time). | |
| float32 | GetRuntimeSeconds () const |
| How long this task has been running for (in seconds). | |
| float32 | GetTimeRequestedToSkip () const |
| Returns how many seconds we're supposed to skip. | |
| void | HandleTimeskipRequest () |
| Let this task skip forward in time, ie. teleporting the Avatar to their destination or somewhere along the way or skipping animations. Use GetTimeRequestedToSkip() and ReportTimeSkipped(...) to get info on how much to skip and to notify if you were able to skip something. | |
| bool | HasBeenActivated () const |
| Returns true if ReadyForActivated has ever been called on this task. | |
| bool | HasTaskJustStarted (float32 ThresholdRealtimeSeconds=10.000000) const |
| Returns true if this task has not been running for long yet. For Dailyroutine-Tasks this can be used to check if the task was activated via the regular schedule or re-activated after the schedule was interrupted. | |
| bool | IsInDailyRoutineSimulation () const |
| Returns true, if this task is owned by an NPC that does DailyRoutine simulation (has no visuals) right now. | |
| bool | ReportTimeSkip (float32 SecondsThatWillBeSkipped) |
| Reports that this task is able to skip some of the requested time to skip and requests for permission to do so. Returns true when the timeskip was accepted and it's okay to do the actions now. | |
| bool | ReportTimeSkipWhateverIsLeft () |
| Reports that this task would run forever and can skip all the time that we have left. Returns true when the timeskip was accepted and it's okay to do the actions now. | |
| void | SetCustomPathfollowingSetting (FGothicPathfollowSettings PathfollowSetting) |
| When pathfollowing should behave different for this AIState, provide your own settings. | |
| Public Member Functions inherited from UAbilityTaskBase | |
| bool | IsFinished () const |
| bool | IsPaused () const |
| UAbilityTaskBase | DuplicateTask (UGameplayAbility ToAbility, UObject Outer=nullptr) |
| bool | IsDuplicateOf (const UAbilityTaskBase Other) const |
| Returns true if this task was created by duplicating the given one. | |
| void | MakeChildOf (UAbilityTaskBase OtherTask) |
| bool | IsActive () const |
| Public Member Functions inherited from UAngelscriptAbilityTask | |
| void | OnDestroy (bool bInOwnerFinished) |
| void | InitSimulatedTask (UGameplayTasksComponent InGameplayTasksComponent) |
| bool | IsWaitingOnAvatar () const |
| void | Activate () |
| bool | IsWaitingOnRemotePlayerdata () const |
| void | TickTask (float32 DeltaTimeSecs) |
| void | SetWaitingOnAvatar () |
| void | ClearWaitingOnAvatar () |
| void | ClearWaitingOnRemotePlayerData () |
| UGameplayAbility | BP_GetAbility (bool bInOwnerFinished) const |
| FGameplayAbilitySpecHandle | GetAbilitySpecHandle (bool bInOwnerFinished) const |
| UAbilitySystemComponent | GetAbilitySystemComponent () |
| bool | ShouldBroadcastAbilityTaskDelegates () const |
| bool | IsForRemoteClient () const |
| bool | IsLocallyControlled () const |
| bool | IsPredictingClient () const |
| UGameplayAbility | GetAbility () const |
| bool | GetIsPausable () |
| void | SetIsPausable (bool bNewState) |
| void | SetIsSimulatedTask (bool bNewState) |
| void | SetAbilitySystemComponent (UAbilitySystemComponent InAbilitySystemComponent) |
| void | SetIsTickingTask (bool bNewState) |
| void | SetWaitingOnRemotePlayerData () |
| bool | GetIsSimulatedTask () |
| bool | GetIsSimulating () |
| bool | GetIsTickingTask () |
| Public Member Functions inherited from UGameplayTask | |
| void | ReadyForActivation () |
| void | EndTask () |
| Called explicitly to end the task (usually by the task itself). Calls OnDestroy. Note:: you need to call EndTask before sending out any "on completed" delegates. If you don't the task will still be in an "active" state while the event receivers may assume it's already "finished". | |
| 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 UClass | StaticClass () |
| Static Public Member Functions inherited from UAbilityTaskBase | |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UAngelscriptAbilityTask | |
| static UClass | StaticClass () |
| static UAngelscriptAbilityTask | CreateAbilityTaskAndRunIt (TSubclassOf< UAngelscriptAbilityTask > TaskType, UGameplayAbility ThisAbility, FName NewInstanceName=NAME_None) |
| This method will both create the task and call ReadyForActivation on it for you immediately. | |
| static UAngelscriptAbilityTask | CreateAbilityTask (TSubclassOf< UAngelscriptAbilityTask > TaskType, UGameplayAbility ThisAbility, FName NewInstanceName=NAME_None, UObject Outer=nullptr) |
| If you create a task using this function from AS, you must start it manually using ReadyForActivation. This is useful if you want to set up properties on the task before you run it. | |
| Static Public Member Functions inherited from UAbilityTask | |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UGameplayTask | |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UObject | |
| static UClass | StaticClass () |
Public Attributes | |
AbilityTaskGeneric | |
| FAbilityTaskEndedAnyResultDelegate__AbilityTaskGeneric | OnTaskEnded |
| Task ended (always called, no matter what the result is). | |
| EGenericTaskResult | TaskResult |
| Use EndTaskAsSuccess() or EndTaskAsFailure() or set this before calling EndTask() to signal the end result of this task. | |
| FInGameTime | TimeTaskActivated |
| Ingame time this task was activated. | |
Variables | |
| const AGothicCharacter | AvatarCharacter |
| If the avatar is a GothicCharacter, returns it. Nullptr otherwise. | |
| const AGothicCharacterState | AvatarCharacterState |
| If the avatar is a GothicCharacter, returns its CharacterState. Nullptr otherwise. | |
| const AGothicAIController | AvatarAIController |
| If the avatar is controlled by an AIController, returns it. Nullptr otherwise. | |
| const AGothicNPCState | AvatarNPCState |
| If the avatar is a n NPC, returns its NPCState. Nullptr otherwise. | |
| const APlayerController | AvatarPlayerController |
| If the avatar is controlled by a PlayerController, returns it. Nullptr otherwise. | |
| const FInGameTime | InGameTimeNow |
| Returns the current InGame-Time (fast-forwarded when the player sleeps). | |
| const FInGameTime | RuntimeInGame |
| How long this task has been running for (in InGame-time). | |
| const float32 | RuntimeSeconds |
| How long this task has been running for (in seconds). | |
| const float32 | TimeRequestedToSkip |
| Returns how many seconds we're supposed to skip. | |
| Public Attributes inherited from UAngelscriptAbilityTask | |
| const UGameplayAbility | Ability |
| GameplayAbility that created us. | |
| UAbilitySystemComponent | AbilitySystemComponent |
| const bool | IsSimulating |
| bool | IsPausable |
| bool | IsSimulatedTask |
| bool | IsTickingTask |
| 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 |
Ability Task with generic Delegates for success, failure, cancel.
Rationale: Having a standardized API simplifies usage from script, most notably from Coroutines.
| void EndTaskAsCancelled | ( | ) |
Call this instead of EndTask() to signal the task was cancelled.
| void EndTaskAsFailure | ( | ) |
Call this instead of EndTask() to signal the task having failed.
| void EndTaskAsSuccess | ( | ) |
Call this instead of EndTask() to signal the task ending successfully.
| void EndTaskWithResult | ( | EGenericTaskResult | Result | ) |
Call this instead of EndTask() to signal the task having failed.
| void ExternalCancel | ( | ) |
| AGothicAIController GetAvatarAIController | ( | ) | const |
If the avatar is controlled by an AIController, returns it. Nullptr otherwise.
| AGothicCharacter GetAvatarCharacter | ( | ) | const |
If the avatar is a GothicCharacter, returns it. Nullptr otherwise.
| AGothicCharacterState GetAvatarCharacterState | ( | ) | const |
If the avatar is a GothicCharacter, returns its CharacterState. Nullptr otherwise.
| AGothicNPCState GetAvatarNPCState | ( | ) | const |
If the avatar is a n NPC, returns its NPCState. Nullptr otherwise.
| APlayerController GetAvatarPlayerController | ( | ) | const |
If the avatar is controlled by a PlayerController, returns it. Nullptr otherwise.
| FInGameTime GetInGameTimeNow | ( | ) | const |
Returns the current InGame-Time (fast-forwarded when the player sleeps).
| FInGameTime GetRuntimeInGame | ( | ) | const |
How long this task has been running for (in InGame-time).
| float32 GetRuntimeSeconds | ( | ) | const |
How long this task has been running for (in seconds).
| float32 GetTimeRequestedToSkip | ( | ) | const |
Returns how many seconds we're supposed to skip.
| void HandleAvatarChanged | ( | ) |
Called when the Character this state belongs to was spawned or despawned.
| void HandleTimeskipRequest | ( | ) |
Let this task skip forward in time, ie. teleporting the Avatar to their destination or somewhere along the way or skipping animations. Use GetTimeRequestedToSkip() and ReportTimeSkipped(...) to get info on how much to skip and to notify if you were able to skip something.
| bool HasBeenActivated | ( | ) | const |
Returns true if ReadyForActivated has ever been called on this task.
| bool HasTaskJustStarted | ( | float32 | ThresholdRealtimeSeconds = 10.000000 | ) | const |
Returns true if this task has not been running for long yet. For Dailyroutine-Tasks this can be used to check if the task was activated via the regular schedule or re-activated after the schedule was interrupted.
| bool IsInDailyRoutineSimulation | ( | ) | const |
Returns true, if this task is owned by an NPC that does DailyRoutine simulation (has no visuals) right now.
| void OnExternalCancel | ( | ) |
Override to decide what should happen when your task got cancelled from outside.
| bool ReportTimeSkip | ( | float32 | SecondsThatWillBeSkipped | ) |
Reports that this task is able to skip some of the requested time to skip and requests for permission to do so. Returns true when the timeskip was accepted and it's okay to do the actions now.
Example:
if (ReportTimeSkip(4))
{
DoActionThatTakes4Seconds();
}
| bool ReportTimeSkipWhateverIsLeft | ( | ) |
Reports that this task would run forever and can skip all the time that we have left. Returns true when the timeskip was accepted and it's okay to do the actions now.
| void SetCustomPathfollowingSetting | ( | FGothicPathfollowSettings | PathfollowSetting | ) |
When pathfollowing should behave different for this AIState, provide your own settings.
For AI only. The setting will be removed automatically when this task ends.
|
static |
| const AGothicAIController AvatarAIController |
If the avatar is controlled by an AIController, returns it. Nullptr otherwise.
| const AGothicCharacter AvatarCharacter |
If the avatar is a GothicCharacter, returns it. Nullptr otherwise.
| const AGothicCharacterState AvatarCharacterState |
If the avatar is a GothicCharacter, returns its CharacterState. Nullptr otherwise.
| const AGothicNPCState AvatarNPCState |
If the avatar is a n NPC, returns its NPCState. Nullptr otherwise.
| const APlayerController AvatarPlayerController |
If the avatar is controlled by a PlayerController, returns it. Nullptr otherwise.
| const FInGameTime InGameTimeNow |
Returns the current InGame-Time (fast-forwarded when the player sleeps).
Task ended (always called, no matter what the result is).
| const FInGameTime RuntimeInGame |
How long this task has been running for (in InGame-time).
| const float32 RuntimeSeconds |
How long this task has been running for (in seconds).
| EGenericTaskResult TaskResult |
Use EndTaskAsSuccess() or EndTaskAsFailure() or set this before calling EndTask() to signal the end result of this task.
| const float32 TimeRequestedToSkip |
Returns how many seconds we're supposed to skip.
| FInGameTime TimeTaskActivated |
Ingame time this task was activated.