I’m freshly new beginner on the UEFN and I’d like to build a qualification system like Fall Guys.
The idea is that each round has a limited number of players to qualify for the next round.
So i’m actually using teleporter as “qualification door” (event biding) but i have no idea about what to do to give the teleporter a limited number of entering, then end the round when this event is reached.
So is it possible to do this on the Creative mode or by using Verse programming ?
There are probably a few ways to implement this but I’d just subscribe to the teleporters TeleportedEvent, and then create a variable to count players who have teleported by adding =+1 to the variable with each trigger.
You can add logic to disable the teleporter once that variable reaches the specified value, and then elminate the remaining players so they move to spectator until your game ends.
If you just want to use creative it would probably be easier to set a “safe zone” at the end with a player counter volume, and when it hits the target amoutn of players activate a barrier device and a damage zone set to eliminate for the players who didn’t make it.
I haven’t done direct event bindnig in creative but I am pretty sure this would work.
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 ?