tracker_device.IncreaseTargetValue() method

This method should increase Target Value for Tracker device, right?
If I setup this device to track eliminations, and initial value of the Target Value property is set to 3, after I call IncreaseTargetValue, Target value should be 4.
But nothing get’s increased in my Target device.
This is my code for resetting Tracker for the player.

    CompleteQuestAndSetNext(Agent : agent)<suspends> : void =       
        CurrTracker.Remove(Agent)
        CurrTracker.Assign(Agent)
        CurrTracker.Reset(Agent)
        CurrTracker.IncreaseTargetValue(Agent)

I tried adding IncreaseTargetValue call to all different places. Before Remove, Assign… but nothing happens.

Hey Petz!

I set up a button device that resets the progress and increments the target value for the Tracker device when the player interacts with the button. Stat to track on the Tracker device is Eliminations. Can you try this and see if it works for you?

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# A Verse-authored creative device that can be placed in a level
test_tracker_device := class(creative_device):

    @editable
    Tracker:tracker_device = tracker_device{}

    @editable
    Button:button_device = button_device{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        Button.InteractedWithEvent.Subscribe(ResetAndChangeGoal)

    ResetAndChangeGoal(Agent:agent):void=
        Tracker.Reset(Agent)
        Tracker.IncreaseTargetValue(Agent)
2 Likes

Thank you for reply. Yes, this works for me.
What I was trying to do is to reuse the quest (with increased target value) after player completes it.
By calling Remove and then Assign methods seems to be the way to reset completed quest. But calling IncreaseTargetValue doesn’t seems to work anymore.

    ResetAndChangeGoal(Agent:agent):void=
            Tracker.Remove(Agent)
            Tracker.Assign(Agent)
            Tracker.Reset(Agent)
            Tracker.IncreaseTargetValue(Agent)
            Print("I was called!")

I solved it with an array of quests. It’s only 4 quests, and they are team based as well. So arrays might be for the better.