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

Behavior Tree service nodes is designed to perform "background" tasks that update AI's knowledge. More...

Public Member Functions

Functions
void SetbRestartTimerOnEachActivation (bool Value)
 if set, next tick time will be always reset to service's interval when node is activated
void SetbCallTickOnSearchStart (bool Value)
 call Tick event when task search enters this node (SearchStart will be called as well)
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 UBTAuxiliaryNode
static UClass StaticClass ()
Static Public Member Functions inherited from UBTNode
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Service
float32 RandomDeviation
 adds random range to service's Interval
float32 Interval
 defines time span between subsequent ticks of the service
Public Attributes inherited from UBTNode
FString NodeName
 node name
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

Behavior Tree service nodes is designed to perform "background" tasks that update AI's knowledge.

Services are being executed when underlying branch of behavior tree becomes active, but unlike tasks they don't return any results and can't directly affect execution flow.

Usually they perform periodical checks (see TickNode) and often store results in blackboard. If any decorator node below requires results of check beforehand, use OnSearchStart function. Keep in mind that any checks performed there have to be instantaneous!

Other typical use case is creating a marker when specific branch is being executed (see OnBecomeRelevant, OnCeaseRelevant), by setting a flag in blackboard.

Because some of them can be instanced for specific AI, following virtual functions are not marked as const:

If your node is not being instanced (default behavior), DO NOT change any properties of object within those functions! Template nodes are shared across all behavior tree components using the same tree asset and must store their runtime properties in provided NodeMemory block (allocation size determined by GetInstanceMemorySize() )

Member Function Documentation

◆ SetbCallTickOnSearchStart()

void SetbCallTickOnSearchStart ( bool Value)

call Tick event when task search enters this node (SearchStart will be called as well)

◆ SetbRestartTimerOnEachActivation()

void SetbRestartTimerOnEachActivation ( bool Value)

if set, next tick time will be always reset to service's interval when node is activated

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ Interval

float32 Interval

defines time span between subsequent ticks of the service

◆ RandomDeviation

float32 RandomDeviation

adds random range to service's Interval