# How can I "reset" the SprintedEvent

**URL:** <https://forums.unrealengine.com/t/how-can-i-reset-the-sprintedevent/1206815>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [June 22, 2023, 12:40am UTC](https://forums.unrealengine.com/t/how-can-i-reset-the-sprintedevent/1206815 "2023-06-22T00:40:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WaffouUEFN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WaffouUEFN](https://forums.unrealengine.com/u/WaffouUEFN)\
**Post date:** [June 22, 2023, 12:40am UTC](https://forums.unrealengine.com/t/how-can-i-reset-the-sprintedevent/1206815/1 "2023-06-22T00:40:51Z")

</div>

I’m making an Script to an object follow the player, but I want to switch the object to different players, but the SprintedEvent activates to all players that has the object before, there’s a way to do this? I tried some methods but nothing works.

```auto
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

teste := class(creative_device):

    @editable IdleAnim : cinematic_sequence_device = cinematic_sequence_device{}
    @editable RunAnim : cinematic_sequence_device = cinematic_sequence_device{}
    @editable Gatilho : trigger_device = trigger_device{}
    @editable Gatilho2 : trigger_device = trigger_device{}
    @editable FGChar : creative_prop = creative_prop{}
    var On : logic = false
    var CurrentAgent : ?agent = false

    Raposa( A : ?agent) : void =
        set CurrentAgent = A
        Sim(A)
        if(On = true):
            if (P := A?, F := P.GetFortCharacter[]):
                IdleAnim.Play()
                F.SprintedEvent().Subscribe(OnMoved)
                spawn:
                    UpdateCharacter(F, vector3{})

    Sair( A : ?agent) : void =
        if (A = CurrentAgent):
            set On = false
            set CurrentAgent = false

    Sim( A : ?agent) : void=
        if (A = CurrentAgent):
            set On = true

    OnBegin<override>()<suspends>:void=
        Gatilho.TriggeredEvent.Subscribe(Raposa)
        Gatilho2.TriggeredEvent.Subscribe(Sair)

    UpdateCharacter(Player : fort_character, Offset : vector3)<suspends>:void=
        loop:
            Sleep(0.0)
            NewPos := Player.GetTransform().Translation + Offset
            if (FGChar.TeleportTo[NewPos, Player.GetTransform().Rotation]) {}
            if (On = false):
                break

    OnMoved(MoveData : tuple(fort_character, logic)):void=
        if (Agent := MoveData(0).GetAgent[]):
            if (Agent = CurrentAgent):
                if (MoveData(1)?):
                    IdleAnim.Stop(Agent)
                    RunAnim.Play(Agent)
                else:
                    RunAnim.Stop(Agent)
                    IdleAnim.Play(Agent) 

```

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [June 23, 2023, 3:45pm UTC](https://forums.unrealengine.com/t/how-can-i-reset-the-sprintedevent/1206815/2 "2023-06-23T15:45:18Z")

</div>

You should use an array of IdleAnim and RunAnim instead of having just one 🙂
