questsystem.Reset

v2.0
View as Markdown

questsystem.Reset belongs to the QuestSystem runtime module.

Aute laboris irure velit sint exercitation minim enim voluptate ut velit nostrud laboris. Dolore sed dolore duis sit nisi dolor duis veniam elit labore aliqua. Excepteur amet aute laboris ad cillum velit sit commodo dolore dolor do. Et enim exercitation veniam velit ex sed aliquip ut adipiscing laboris labore aliquip aliquip.

Declaration

 1UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
 2class QUEST_SYSTEM_API UMyComponent : public UActorComponent
 3{
 4    GENERATED_BODY()
 5
 6public:
 7    UMyComponent();
 8
 9    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings")
10    float UpdateInterval = 0.1f;
11
12    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings")
13    bool bAutoActivate = true;
14
15    UFUNCTION(BlueprintCallable, Category = "QuestSystem")
16    void SetConfiguration(const FMyConfig& Config);
17
18protected:
19    virtual void BeginPlay() override;
20    virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
21
22private:
23    FMyConfig CurrentConfig;
24    float TimeSinceLastUpdate = 0.0f;
25};

Members

Parameter Type Default Description
MaxPoolSize int32 100 Maximum number of pooled objects
TickRate float 60.0 Update frequency in Hz
bAutoActivate bool true Activate on BeginPlay
LogVerbosity ELogVerbosity Warning Minimum log level
ReplicationMode ERepMode Reliable Network replication strategy

Example

 1// Declare delegates for event-driven communication
 2DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnStateChanged, EMyState, NewState);
 3DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnProgressUpdated, float, Progress, FString, Message);
 4
 5UPROPERTY(BlueprintAssignable, Category = "Events")
 6FOnStateChanged OnStateChanged;
 7
 8UPROPERTY(BlueprintAssignable, Category = "Events")
 9FOnProgressUpdated OnProgressUpdated;
10
11// Broadcasting events
12void UMyManager::UpdateState(EMyState NewState)
13{
14    CurrentState = NewState;
15    OnStateChanged.Broadcast(NewState);
16    OnProgressUpdated.Broadcast(GetProgress(), GetStatusMessage());
17}