using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
MainClass := class(creative_device):
UIText<localizes>(Player : player,Index : int): message ="{Player} in {Index} team"
TeamSet(Player : player,Index : int):void=
TeamCol := GetPlayspace().GetTeamCollection()
if(t := TeamCol.GetTeams()[Index]):
Print(UIText(Player,Index))
else:
Print("TeamSetError")
TeamIndex(Player : player):int=
TeamCol := GetPlayspace().GetTeamCollection()
for(Index -> _Team : TeamCol.GetTeams()):
if(t := TeamCol.GetTeam[Player],t = _Team):
Print("TeamIndex = {Index}")
return Index
Print("TeamGetError")
return -1
EasyTeamModule := module:
#TeamChange
(Player : player).TeamSet<public>(Index : int):void=
MC := MainClass{}
MC.TeamSet(Player,Index)
#GetTeamIndex
(Player : player).GetTeamIndex<public>():int=
MC := MainClass{}
return MC.TeamIndex(Player)
Player.TeamSet(0)
You can change the team by simply .
*This module allows you to write team changes more easily, and of course it will not work if the team does not exist.
Thank you for your report! Can you please re-post using the “New Issue” option on the Issues and Bug Reporting forums? Posts with this feature are connected directly into our development team so we can quickly get to them!
For more information, such as how to get the reference ID, please check out the article here: Using the Creative and UEFN Bug Reporting Form