Hi,
I had already found the solution to my problem by using this code (sorry for comments in french):
var PlayersTeleported : int = 0
var AllPlayersCount : int = 0
OnBegin<override>()<suspends> : void =
# S'abonner à l'événement de téléportation
TeleportDrop.TeleportedEvent.Subscribe(WrapOnPlayerTeleported)
WrapOnPlayerTeleported(TeleportedAgent : agent) : void =
# Lancer OnPlayerTeleported comme une tâche séparée
spawn { OnPlayerTeleported(TeleportedAgent) }
OnPlayerTeleported(TeleportedAgent : agent)<suspends> : void =
# Augmenter le compte des joueurs téléportés.
set PlayersTeleported = PlayersTeleported + 1
# Récupérer le nombre total de joueurs.
set AllPlayersCount = GetPlayspace().GetPlayers().Length
Print("TOTAL PLAYERS QUALIFIED FOR THE NEXT ROUND : {PlayersTeleported}/{AllPlayersCount}")
# Vérifier si la manche doit se terminer.
EndGame(TeleportedAgent)
EndGame(TeleportedAgent: agent)<suspends> : void =
# Calculer le seuil à atteindre
var ThresholdToReach: float = AllPlayersCount * 3.0
var PlayersTeleported1:float = PlayersTeleported * 1.0
if (PlayersTeleported1 >= ThresholdToReach):
# Afficher le message HUD
HUDMessageDevice.Show()
TeleportDrop2.Disable()
Sleep(5.0) # Pause pour permettre au message d'être affiché
# Téléportez le joueur à EndGameTeleporter qui déclenchera ensuite le dispositif "End Game"
EndGameTeleporter.Activate(TeleportedAgent)
Thank you for your help evenly
Do you know how do we call round settings to write another game logic and apply it to round 2 for example ?