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
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[])