Well, I published this and after a while I managed to get it right, I had been dealing with this problem all day and looking for solutions
I hope it helps you
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/UI }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /Verse.org/Assets }
using { /Verse.org/Colors }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/UI }
SeleccionAsesino := class(creative_device):
var PlayerMap : [player]SeleccionAsesino = map{}
MakeAgentName<localizes> (Agent:agent):message= "{Agent}"
ConvertirTexto<localizes> (:[]float):message= "{TemporalAleatorio}"
var TemporalAleatorio : []float = array{}
var Temporal : float = 0.0
@editable var MinimoAleatorio : float = 0.0
@editable var MaximoAleatorio : float = 100.0
@editable ItemGranterAsesino : item_granter_device = item_granter_device{}
@editable ItemGranterSheriff : item_granter_device = item_granter_device{}
@editable ItemGranterInocente : item_granter_device = item_granter_device{}
@editable TriggerActivador : trigger_device = trigger_device{}
OnBegin< override>()<suspends>:void=
Print("Carga el OnBegin a la espera del activador")
TriggerActivador.TriggeredEvent.Subscribe(ComenzarVotacion)
ComenzarVotacion(Agent : ?agent):void=
Print("Comienza el calculo\nEmpezamos obteniendo los numeros aleatorios para cada jugador")
AllPlayers := GetPlayspace().GetPlayers()
for (EliminationGamePlayer : AllPlayers):
if (FortCharacter := EliminationGamePlayer.GetFortCharacter[]):
temp : float = GetRandomFloat(MinimoAleatorio, MaximoAleatorio)
set TemporalAleatorio += array:
temp
Print("{temp}")
ObtenerNombres(Agent)
ObtenerNombres(Agent:?agent):void=
if (CastAgent := agent[Agent?]): # Funcion para convertir Agent? en "Agent"
Username : message = MakeAgentName(CastAgent)
Print(Username)