|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Functions | |
AI | |
| bool | IsValidAILocation (FVector Location) |
| UBlackboardComponent | GetBlackboard (AActor Target) |
| UNavigationPath | GetCurrentPath (AController Controller) |
| Returns a NEW UOBJECT that is a COPY of navigation path given controller is currently using. The result being a copy means you won't be able to influence agent's pathfollowing by manipulating received path. Please use GetCurrentPathPoints if you only need the array of path points. | |
| int | GetCurrentPathIndex (const AController Controller) |
| Return the path index the given controller is currently at. Returns INDEX_NONE if no path. | |
| const TArray< FVector > | GetCurrentPathPoints (AController Controller) |
| Returns an array of navigation path points given controller is currently using. | |
| int | GetNextNavLinkIndex (const AController Controller) |
| Return the path index of the next nav link for the current path of the given controller. Returns INDEX_NONE if no path or no incoming nav link. | |
| bool | IsValidAIDirection (FVector DirectionVector) |
| AAIController | GetAIController (AActor ControlledActor) |
| The way it works exactly is if the actor passed in is a pawn, then the function retrieves pawn's controller cast to AIController. Otherwise the function returns actor cast to AIController. | |
| bool | IsValidAIRotation (FRotator Rotation) |
| void | SendAIMessage (APawn Target, FName Message, UObject MessageSource, bool bSuccess=true) |
| APawn | SpawnAIFromClass (TSubclassOf< APawn > PawnClass, UBehaviorTree BehaviorTree, FVector Location, FRotator Rotation=FRotator(), bool bNoCollisionFail=false, AActor Owner=nullptr) |
| Spawns AI agent of a given class. The PawnClass needs to have AIController set for the function to spawn a controller as well. | |
AI|Navigation | |
| void | SimpleMoveToLocation (AController Controller, FVector Goal) |
| void | SimpleMoveToActor (AController Controller, const AActor Goal) |
Animation | |
| void | UnlockAIResourcesWithAnimation (UAnimInstance AnimInstance, bool bUnlockMovement, bool UnlockAILogic) |
| unlocks indicated AI resources of animated pawn. Will unlock only animation-locked resources | |
| void | LockAIResourcesWithAnimation (UAnimInstance AnimInstance, bool bLockMovement, bool LockAILogic) |
| locks indicated AI resources of animated pawn | |
| AAIController GetAIController | ( | AActor | ControlledActor | ) |
The way it works exactly is if the actor passed in is a pawn, then the function retrieves pawn's controller cast to AIController. Otherwise the function returns actor cast to AIController.
| UBlackboardComponent GetBlackboard | ( | AActor | Target | ) |
| UNavigationPath GetCurrentPath | ( | AController | Controller | ) |
Returns a NEW UOBJECT that is a COPY of navigation path given controller is currently using. The result being a copy means you won't be able to influence agent's pathfollowing by manipulating received path. Please use GetCurrentPathPoints if you only need the array of path points.
| int GetCurrentPathIndex | ( | const AController | Controller | ) |
Return the path index the given controller is currently at. Returns INDEX_NONE if no path.
| const TArray< FVector > GetCurrentPathPoints | ( | AController | Controller | ) |
Returns an array of navigation path points given controller is currently using.
| int GetNextNavLinkIndex | ( | const AController | Controller | ) |
Return the path index of the next nav link for the current path of the given controller. Returns INDEX_NONE if no path or no incoming nav link.
| bool IsValidAIDirection | ( | FVector | DirectionVector | ) |
| bool IsValidAILocation | ( | FVector | Location | ) |
| bool IsValidAIRotation | ( | FRotator | Rotation | ) |
| void LockAIResourcesWithAnimation | ( | UAnimInstance | AnimInstance, |
| bool | bLockMovement, | ||
| bool | LockAILogic ) |
locks indicated AI resources of animated pawn
| void SimpleMoveToActor | ( | AController | Controller, |
| const AActor | Goal ) |
| void SimpleMoveToLocation | ( | AController | Controller, |
| FVector | Goal ) |
| APawn SpawnAIFromClass | ( | TSubclassOf< APawn > | PawnClass, |
| UBehaviorTree | BehaviorTree, | ||
| FVector | Location, | ||
| FRotator | Rotation = FRotator ( ), | ||
| bool | bNoCollisionFail = false, | ||
| AActor | Owner = nullptr ) |
Spawns AI agent of a given class. The PawnClass needs to have AIController set for the function to spawn a controller as well.
| BehaviorTree | if set, and the function has successfully spawned and AI controller, this BehaviorTree asset will be assigned to the AI controller, and run. |
| Owner | lets you spawn the AI in a sublevel rather than in the persistent level (which is the default behavior). |
| void UnlockAIResourcesWithAnimation | ( | UAnimInstance | AnimInstance, |
| bool | bUnlockMovement, | ||
| bool | UnlockAILogic ) |
unlocks indicated AI resources of animated pawn. Will unlock only animation-locked resources