Why does it return “TemporalAleatorio” I think it should return a float
I’m sorry for the errors in my code, but I’m trying to make a randomization system for my murder game, to choose between Murder, Sheriff or Innocent.
And what I do in the code is take the name of the players (I assume for now mine is displayed) and give them a percentage!
Thank you all! I see a lot of help in other discussions and you always find a solution! Wow!
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[]):
set TemporalAleatorio += array:
GetRandomFloat(MinimoAleatorio, MaximoAleatorio)
Print(ConvertirTexto(TemporalAleatorio))
ObtenerNombres(Agent)
ObtenerNombres(Agent:?agent):void=
if (CastAgent := agent[Agent?]): # Funcion para convertir Agent? en "Agent"
Username : message = MakeAgentName(CastAgent)
Print(Username)