How to trigger activation of Movement Modulator Device with verse?

I’m trying to make a device that would detect when they player has jumped and then trigger the movement device to apply force to the player. Jump detection works but assigning player to activation gives an error.

Other idea i had is to return true from jump triggering and turn it into a signal that i could use in movement device it self. But i just don’t know how to do it :confused:

The code:

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

JumpBoostDevice := class(creative_device):
@editable
var the_movement_device : movement_modulator_device = movement_modulator_device{}

OnBegin<override>()<suspends>:void=
    Players:[]player := Self.GetPlayspace().GetPlayers()
        for (Char -> Index : Players):
            if (FortChar := Players[Char].GetFortCharacter[]):
                FortChar.JumpedEvent().Subscribe(HandlePlayerJump)
HandlePlayerJump(the_player:fort_character):true= 
    the_movement_device.Activate(the_player.GetAgent[])

fort_character.GetAgent[] is a fallible functions so it seems the only thing you’re missing is to handle that potential failure case. If you change your function to this it should work fine.

HandlePlayerJump(the_player:fort_character):true=
    if(TheAgent := the_player.GetAgent[]):
        the_movement_device.Activate(TheAgent )