# \<decides\> issue. Setting 2 Teams of Random Players?

**URL:** <https://forums.unrealengine.com/t/decides-issue-setting-2-teams-of-random-players/1797707>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 10, 2024, 8:40pm UTC](https://forums.unrealengine.com/t/decides-issue-setting-2-teams-of-random-players/1797707 "2024-04-10T20:40:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoffeeMoth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CoffeeMoth](https://forums.unrealengine.com/u/CoffeeMoth)\
**Post date:** [April 10, 2024, 8:40pm UTC](https://forums.unrealengine.com/t/decides-issue-setting-2-teams-of-random-players/1797707/1 "2024-04-10T20:40:00Z")

</div>

Working on a Prop Hunt map. There are 2 Teams, Props and Hunters.  
At the beginning of each round, I want to pick completely random players to be hunters, and everyone else is on the Prop Team.

![BalanceTeams](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/7/837248e600e00dca97272deff9dad094b2b7386c.png)

I get the players in the game, and then the teams.  
I set the Teams = the number of players I want, however I need to use decides…

The issue is I cannot call BalanceTeams() inside of OnBegin, so how would I call it?  
Do I need to restructure my code to error check properly instead of using decides?

![OnBegin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/b/4db442658d5155fcb3165913df9bc7ab845dd115.png)

---

<div class="post-metadata">

**Author:** ![ok\_studios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ok\_studios](https://forums.unrealengine.com/u/ok_studios)\
**Post date:** [April 12, 2024, 2:18am UTC](https://forums.unrealengine.com/t/decides-issue-setting-2-teams-of-random-players/1797707/2 "2024-04-12T02:18:31Z")

</div>

Hi.  
Wouldn’t you just enclose those calls within IF statements, so there’s rollback?

for(I := 0…MaximumProp-1):  
if (TeamCollection.AddToTeam[AllPlayers[i], MaybeProps?]){}

---

<div class="post-metadata">

**Author:** ![CoffeeMoth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CoffeeMoth](https://forums.unrealengine.com/u/CoffeeMoth)\
**Post date:** [April 12, 2024, 4:30am UTC](https://forums.unrealengine.com/t/decides-issue-setting-2-teams-of-random-players/1797707/3 "2024-04-12T04:30:57Z")

</div>

Wow! Thanks. Still learning this language one step at a time.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 12, 2024, 4:31am UTC](https://forums.unrealengine.com/t/decides-issue-setting-2-teams-of-random-players/1797707/4 "2024-05-12T04:31:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
