As the title suggests, When i start my game, everything is fine and dandy, players are assigned their powers with the corresponding device, however, when they get to round 2, they are still assigned to those devices. which means if the plsyer changes to a different power, they will have both powers.
Here’s my ninja power verse script:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using {/Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/Diagnostics }
# A Verse-authored creative device that can be placed in a level
Ninja_Device := class(creative_device):
@editable
Ninja_Spawner : player_spawner_device = player_spawner_device{}
@editable
Map_Indicator : map_indicator_device = map_indicator_device{}
@editable
Limiter : mutator_zone_device = mutator_zone_device{}
var Not_Crouched : logic = true
On_Crouched(FortCharacter:fort_character, Logic:logic) : void=
if (Not_Crouched?):
FortCharacter.Hide()
set Not_Crouched = false
Limiter.Enable()
spawn:
Event_Tick(FortCharacter)
else:
FortCharacter.Show()
set Not_Crouched = true
Limiter.Disable()
Player_Spawned(Agent:agent) : void=
if (FortCharacter := Agent.GetFortCharacter[]):
FortCharacter.CrouchedEvent().Subscribe(On_Crouched)
Print("Ninja Assigned")
Event_Tick(FortCharacter:fort_character)<suspends> : void=
loop:
Sleep(3.0)
if (Not_Crouched?):
Map_Indicator.Disable()
break
Player_Transform := FortCharacter.GetTransform()
if (Map_Indicator.TeleportTo[Player_Transform]):
Map_Indicator.Enable()
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
Print("Ninja Initialised")
Ninja_Spawner.SpawnedEvent.Subscribe(Player_Spawned)
This works fine to begin with, But come round 2, things are broken.