I’m trying to play a sequence to the nearest Player, heres my Code, how can I play it let’s say for Player[0]? I would appreciate any help
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Characters }
spawncloud := class(creative_device):
@editable
CloudProp : creative_prop = creative_prop{}
@editable
CinematicSequenceDevice : cinematic_sequence_device = cinematic_sequence_device{}
@editable
SignalRemoteBlue : signal_remote_manager_device = signal_remote_manager_device{}
HandlePrimaryButton(Player: agent)<suspends>: void =
if(F := Player.GetFortCharacter[]):
PlayerPositiont : vector3 = F.GetTransform().Translation
if(PlayerList := GetPlayspace().GetPlayers(), FortniteCharacter := PlayerList[0].GetFortCharacter[]):
PlayerPosition : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList1 := GetPlayspace().GetPlayers(), FortniteCharacter1 := PlayerList[1].GetFortCharacter[]):
PlayerPosition1 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList2 := GetPlayspace().GetPlayers(), FortniteCharacter2 := PlayerList[2].GetFortCharacter[]):
PlayerPosition2 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList3 := GetPlayspace().GetPlayers(), FortniteCharacter3 := PlayerList[3].GetFortCharacter[]):
PlayerPosition3 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList4 := GetPlayspace().GetPlayers(), FortniteCharacter4 := PlayerList[4].GetFortCharacter[]):
PlayerPosition4 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList15 := GetPlayspace().GetPlayers(), FortniteCharacter5 := PlayerList[5].GetFortCharacter[]):
PlayerPosition5 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList5 := GetPlayspace().GetPlayers(), FortniteCharacter6 := PlayerList[6].GetFortCharacter[]):
PlayerPosition6 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList6 := GetPlayspace().GetPlayers(), FortniteCharacter7 := PlayerList[7].GetFortCharacter[]):
PlayerPosition7 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList7 := GetPlayspace().GetPlayers(), FortniteCharacter8 := PlayerList[8].GetFortCharacter[]):
PlayerPosition8 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList8 := GetPlayspace().GetPlayers(), FortniteCharacter9 := PlayerList[9].GetFortCharacter[]):
PlayerPosition9 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList9 := GetPlayspace().GetPlayers(), FortniteCharacter10 := PlayerList[10].GetFortCharacter[]):
PlayerPosition10 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList10 := GetPlayspace().GetPlayers(), FortniteCharacter11 := PlayerList[11].GetFortCharacter[]):
PlayerPosition11 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList17 := GetPlayspace().GetPlayers(), FortniteCharacter12 := PlayerList[12].GetFortCharacter[]):
PlayerPosition12 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList11 := GetPlayspace().GetPlayers(), FortniteCharacter13 := PlayerList[13].GetFortCharacter[]):
PlayerPosition13 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList12 := GetPlayspace().GetPlayers(), FortniteCharacter14 := PlayerList[14].GetFortCharacter[]):
PlayerPosition14 : vector3 = FortniteCharacter.GetTransform().Translation
if(PlayerList13 := GetPlayspace().GetPlayers(), FortniteCharacter15 := PlayerList[15].GetFortCharacter[]):
PlayerPosition15 : vector3 = FortniteCharacter.GetTransform().Translation
Distance1 := Distance(PlayerPositiont, PlayerPosition)
Distance2 := Distance(PlayerPositiont, PlayerPosition1)
Distance3:= Distance(PlayerPositiont, PlayerPosition2)
Distance4 := Distance(PlayerPositiont, PlayerPosition3)
Distance5 := Distance(PlayerPositiont, PlayerPosition4)
Distance6 := Distance(PlayerPositiont, PlayerPosition5)
Distance7 := Distance(PlayerPositiont, PlayerPosition6)
Distance8 := Distance(PlayerPositiont, PlayerPosition7)
Distance9 := Distance(PlayerPositiont, PlayerPosition8)
Distance10 := Distance(PlayerPositiont, PlayerPosition9)
Distance11 := Distance(PlayerPositiont, PlayerPosition10)
Distance12 := Distance(PlayerPositiont, PlayerPosition11)
Distance13 := Distance(PlayerPositiont, PlayerPosition12)
Distance14 := Distance(PlayerPositiont, PlayerPosition13)
Distance15 := Distance(PlayerPositiont, PlayerPosition14)
Distance16 := Distance(PlayerPositiont, PlayerPosition15)
if (Distance1 < Distance2 and Distance1 < Distance3 and Distance1 < Distance4 and Distance1 < Distance5 and
Distance1 < Distance6 and Distance1 < Distance7 and Distance1 < Distance8 and Distance1 < Distance9 and
Distance1 < Distance10 and Distance1 < Distance11 and Distance1 < Distance12 and Distance1 < Distance13 and
Distance1 < Distance14 and Distance1 < Distance15 and Distance1 < Distance16)
{
CinematicSequenceDevice.Play()
}
if (Distance2 < Distance1 and Distance2 < Distance3 and Distance2 < Distance4 and Distance2 < Distance5 and
Distance2 < Distance6 and Distance2 < Distance7 and Distance2 < Distance8 and Distance2 < Distance9 and
Distance2 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance3 < Distance1 and Distance3 < Distance2 and Distance3 < Distance4 and Distance3 < Distance5 and
Distance3 < Distance6 and Distance3 < Distance7 and Distance3 < Distance8 and Distance3 < Distance9 and
Distance3 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance4 < Distance1 and Distance4 < Distance2 and Distance4 < Distance3 and Distance4 < Distance5 and
Distance4 < Distance6 and Distance4 < Distance7 and Distance4 < Distance8 and Distance4 < Distance9 and
Distance4 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance5 < Distance1 and Distance5 < Distance2 and Distance5 < Distance3 and Distance5 < Distance4 and
Distance5 < Distance6 and Distance5 < Distance7 and Distance5 < Distance8 and Distance5 < Distance9 and
Distance5 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance6 < Distance1 and Distance6 < Distance2 and Distance6 < Distance4 and Distance6 < Distance5 and
Distance6 < Distance3 and Distance6 < Distance7 and Distance6 < Distance8 and Distance6 < Distance9 and
Distance6 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance7 < Distance1 and Distance7 < Distance2 and Distance7 < Distance4 and Distance7 < Distance5 and
Distance7 < Distance6 and Distance7 < Distance3 and Distance7 < Distance8 and Distance7 < Distance9 and
Distance7 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance8 < Distance1 and Distance8 < Distance2 and Distance8 < Distance4 and Distance8 < Distance5 and
Distance8 < Distance6 and Distance8 < Distance7 and Distance8 < Distance3 and Distance8 < Distance9 and
Distance8 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance9 < Distance1 and Distance9 < Distance2 and Distance9 < Distance4 and Distance9 < Distance5 and
Distance9 < Distance6 and Distance9 < Distance7 and Distance9 < Distance8 and Distance9 < Distance3 and
Distance9 < Distance10):
CinematicSequenceDevice.Play()
else:
if (Distance10 < Distance1 and Distance10 < Distance2 and Distance10 < Distance4 and Distance10 < Distance5 and
Distance10 < Distance6 and Distance10 < Distance7 and Distance10 < Distance8 and Distance10 < Distance9 and
Distance10 < Distance3):
CinematicSequenceDevice.Play()
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
else:
Call(Agent: agent):void=
spawn{HandlePrimaryButton(Agent)}
OnBegin<override>()<suspends>: void =
SignalRemoteBlue.PrimarySignalEvent.Subscribe(Call)
SignalRemoteBlue.SecondarySignalEvent.Subscribe(Call)