I have a GunGame map with 4 mini maps where players are randomly teleported. But when player is eliminated, he is reborn on the others mini maps. Even after having created a system that disables all spawn pads outside of the mini map that was chosen by RGN. They are activated when they are teleported there. I do not know what’s happening… Help please…
The pads definitely work in the latest version of UEFN. I’d like to help but I need more info on this “created a system that disables all spawn pads”. We would need to see Verse code or a more detailed description of how your system works (if it is devices linked together) in order to be any help.
Yes, I’ve encountered the error, but I don’t know how to solve it. The system is simple when I teleport all players to a new mini map with the same trigger i deactivate all pads that are outside that same mini map. The problem is in the version code, which forces the player to respawn even when the pads are deactivated. Random spawns. But I don’t really know how to adjust the Verse code…
IRespawnFFA := class(creative_device):
@editable var SpawnsPad : []player_spawner_device = array{}
@editable ElimManager : elimination_manager_device = elimination_manager_device{}
SelfEliminated(Agent:agent):void=
PadRandom := GetRandomInt(1,SpawnsPad.Length)
if ( RandomInt := SpawnsPad[PadRandom-1] ):
Transform := RandomInt.GetTransform()
Agent.Respawn(Transform.Translation, Transform.Rotation)
OnBegin<override>()<suspends>:void=
ElimManager.EliminatedEvent.Subscribe(SelfEliminated)
Yeah spawnpad enabling/disabling doesn’t really work well anyway outside of verse.
I’ve found the most consistent way of spawning in different places is by changing the players class Setting the spawnpads of each different area to a different class.
Not good if your already using more than 4 classes for loadout or character types.
4 classes X 4 areas = 16 classes limit
Actually I want to post a request for something like spawnpad groups, so we can change players spawnpad groups off events.
Sadly, I’m not really sure of a fix of the top of my head. But my first instinct is to check all of the respawn settings in your island’s island settings. It may be that your players are not ready to respawn when reaching the SelfEliminated code and are actually respawning due with the default settings.
Just a thought.
this code was made for other purposes… I should here create a function to confirm if the spawn pad is active before respawning. Because as soon as I deactivate the code everything works fine. But I lose instant respawn. What is really essential in a gungame
Instead of disabling/enabling spawn pads, you could assign them to different groups as you discussed above, for example like this:
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/FortPlayerUtilities }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
spawn_pad_group := class<concrete>:
@editable
SpawnPads : []player_spawner_device = array{}
spawn_pad_group_demo := class(creative_device):
@editable
SpawnPadGroups : []spawn_pad_group = array{}
@editable
ElimManager : elimination_manager_device = elimination_manager_device{}
var CurrentMinigame : int = 0 # Increment this to respawn at the next group
SelfEliminated(Agent : agent):void=
if (CurrentPads := SpawnPadGroups[CurrentMinigame].SpawnPads):
PadRandom := GetRandomInt(1, CurrentPads.Length)
if ( RandomInt := CurrentPads[PadRandom-1] ):
Transform := RandomInt.GetTransform()
Agent.Respawn(Transform.Translation, Transform.Rotation)
OnBegin<override>()<suspends>:void=
ElimManager.EliminatedEvent.Subscribe(SelfEliminated)
When CurrentMinigame
is 0, players respawn at the first group, when it is 1, they respawn at the second group, and so on. You could also use fort_character.TeleportTo
instead of agent.Respawn
to move (active/alive) players around (to any kind of prop) without necessarily respawning.
Okay, I understand the logi. Thank you for your help. You really understand this! I will try my best. I would really like to be able to release this map as soon as possible. I’ve already learned a lot from him!
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/FortPlayerUtilities }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
spawn_pad_group := class:
@editable
SpawnPads : player_spawner_device = array{}
spawn_pad_group_demo := class(creative_device):
@editable
SpawnPadGroups : spawn_pad_group = array{}
@editable
triggerTilted:trigger_device = trigger_device{}
@editable
triggerIndustries:trigger_device = trigger_device{}
@editable
triggerCastel:trigger_device = trigger_device{}
@editable
triggerRoom:trigger_device = trigger_device{}
@editable
triggerUnderWorld:trigger_device = trigger_device{}
@editable
ElimManager : elimination_manager_device = elimination_manager_device{}
var CurrentMinigame : int = 0 # Increment this to respawn at the next group
triggerTilted.TriggeredEvent.Subscribe(onTilted)
triggerIndustries.TriggeredEvent.Subscribe(onIndustries)
triggerCastel.TriggeredEvent.Subscribe(onCastel)
triggerRoom.TriggeredEvent.Subscribe(onRoom)
triggerUnderWorld.TriggeredEvent.Subscribe(onUnderWorld)
onTilted():void =
set CurrentMinigame = 0
onIndustries():void =
set CurrentMinigame = 1
onCastel():void =
set CurrentMinigame = 2
onRoom():void =
set CurrentMinigame = 3
onUnderWorld():void =
set CurrentMinigame = 4
SelfEliminated(Agent : agent):void=
if (CurrentPads := SpawnPadGroups[CurrentMinigame].SpawnPads):
PadRandom := GetRandomInt(1, CurrentPads.Length)
if ( RandomInt := CurrentPads[PadRandom-1] ):
Transform := RandomInt.GetTransform()
Agent.Respawn(Transform.Translation, Transform.Rotation)
OnBegin<override>()<suspends>:void=
ElimManager.EliminatedEvent.Subscribe(SelfEliminated)
I try this but i have errors in the code, I’m not very good
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/FortPlayerUtilities }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
spawn_pad_group := class<concrete>:
@editable
SpawnPads : []player_spawner_device = array{}
spawn_pad_group_demo := class(creative_device):
@editable
SpawnPadGroups : []spawn_pad_group = array{}
@editable
triggerTilted:trigger_device = trigger_device{}
@editable
triggerIndustries:trigger_device = trigger_device{}
@editable
triggerCastel:trigger_device = trigger_device{}
@editable
triggerRoom:trigger_device = trigger_device{}
@editable
triggerUnderWorld:trigger_device = trigger_device{}
@editable
ElimManager : elimination_manager_device = elimination_manager_device{}
var CurrentMinigame : int = 0 # Increment this to respawn at the next group
onTilted(Agent:?agent):void =
set CurrentMinigame = 0
onIndustries(Agent:?agent):void =
set CurrentMinigame = 1
onCastel(Agent:?agent):void =
set CurrentMinigame = 2
onRoom(Agent:?agent):void =
set CurrentMinigame = 3
onUnderWorld(Agent:?agent):void =
set CurrentMinigame = 4
SelfEliminated(Agent : agent):void=
if (CurrentPads := SpawnPadGroups[CurrentMinigame].SpawnPads):
PadRandom := GetRandomInt(1, CurrentPads.Length)
if ( RandomInt := CurrentPads[PadRandom-1] ):
Transform := RandomInt.GetTransform()
Agent.Respawn(Transform.Translation, Transform.Rotation)
OnBegin<override>()<suspends>:void=
triggerTilted.TriggeredEvent.Subscribe(onTilted)
triggerIndustries.TriggeredEvent.Subscribe(onIndustries)
triggerCastel.TriggeredEvent.Subscribe(onCastel)
triggerRoom.TriggeredEvent.Subscribe(onRoom)
triggerUnderWorld.TriggeredEvent.Subscribe(onUnderWorld)
ElimManager.EliminatedEvent.Subscribe(SelfEliminated)
managed to get here. But the first mini map is not respawning players correctly. It’s only after we move on to the second that everything is fine. Won’t it be necessary to add Sleep somewhere???
In what way are the players not respawning correctly in the first minigame? The code is the same for each of them, so I don’t see what the difference might be. Could it have something to do with how the spawn pad groups are set up in UEFN? It can be easy to switch things up there, like adding the same pad twice and missing one, etc.
I don’t see the need for Sleep()
-expressions here, are you thinking of something in particular?
I already managed to solve it in a certain way… It certainly wasn’t the best way, but basically the RNG device was starting immediately in game start. Basically I added a time device of 0.5 seconds for it to start and it works like this. I really appreciate your help, thank you very much! A big hug
You’re welcome. Good job figuring it out!
Hey, im new in coding and I can’t figure out how to disable certain spawner groups (Index Number 2 in the array). My Array code looks very very similar to yours. I’ve been stuck on this problem for days now.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.