# How can I get number of players online?

**URL:** <https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976>\
**Category:** ARK: Survival Evolved\
**Tags:** unreal-engine, Ark:-Survival-Evolved, Modding\
**Created:** [October 1, 2016, 5:53pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976 "2016-10-01T17:53:26Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 12, 2016, 1:10am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/21 "2016-10-12T01:10:59Z")

</div>

Still does not work

 ![player6.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/a/0a83bf4fb878dcbb23a1773d3de5612b0cfc84e2.jpeg)

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 12, 2016, 1:38am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/22 "2016-10-12T01:38:53Z")

</div>

Does F1 actually fire from the pawn? This is supposed to be in PlayerController. You might need to get owner controller. I’d add a “Print String” in there for you to see that it’s working, as well as a print string from cast failed saying “Cast failed”

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 12, 2016, 2:04am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/23 "2016-10-12T02:04:18Z")

</div>

I have the widget otherwise always started and it worked.

 ![player7.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/a/4a24b2d0557bb1abd701e5d5fa530d4b0f0e7ddb.jpeg)

Then I wanted the player display with purely and have it after the screenshot from above reproduced, thought it worked so.

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 12, 2016, 2:26am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/24 "2016-10-12T02:26:24Z")

</div>

If I connect the “print string” with “cast failed” and press F1, the top left appears Hello

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 12, 2016, 2:55am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/25 "2016-10-12T02:55:51Z")

</div>

Your cast is failing, which means your “BattleGameState” is not the default GameState for your session. Cast to ShooterPlayerState instead and it should work.

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 12, 2016, 10:11am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/26 "2016-10-12T10:11:22Z")

</div>

I can not find anything with Cast to ShooterPlayerState

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 12, 2016, 4:49pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/27 "2016-10-12T16:49:05Z")

</div>

I meant shootergamestate, sorry

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 12, 2016, 11:01pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/28 "2016-10-12T23:01:45Z")

</div>

Thanks, now the widget is displayed, but in the textblock is displayed in the Dev-kit or online on the gameserver nothing

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 13, 2016, 1:14am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/29 "2016-10-13T01:14:36Z")

</div>

Is the variable in the widget hidden? When you’re in the graph, and you see the variables on the left, there’s a little eyeball next to them. If you click that eyeball it’ll open up and turn yellow, meaning it can be edited from other blueprints

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 13, 2016, 1:40am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/30 "2016-10-13T01:40:14Z")

</div>

Variable is public.

---

<div class="post-metadata">

**Author:** ![Lifefire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lifefire](https://forums.unrealengine.com/u/Lifefire)\
**Post date:** [October 13, 2016, 6:35pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/31 "2016-10-13T18:35:07Z")

</div>

I have been having trouble with the same thing, i have tried creating a new variable in PlayerPawnTest then trying to return it to a UI, i have also tried the same thing using “PlayerControllerBluePrint to UI”.

Everything i have tried has failed to communicate between both blueprints, Event Dispatchers, Casting, BP Interfaces, and even “Creating Widgets through the Graph”. I even tried everything in this thread and several other “Non-Ark” threads but none worked. Without the graphs communicating, i have print strings in each and they do not fail. It just appears to be an issue getting the new variables from other class blueprints to show up in the context menu.

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 14, 2016, 12:43am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/32 "2016-10-14T00:43:05Z")

</div>

It must work somehow, because WoefulMacabre has it in its Mod synonymous inside

> **[Steam Workshop::ACM V2.7.1294 \[UNSTABLE\]](https://steamcommunity.com/sharedfiles/filedetails/?id=558079412)**

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 14, 2016, 4:13am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/33 "2016-10-14T04:13:26Z")

</div>

Worked perfectly fine for me on a fresh mod… Did it all from scratch, no issues. The only thing I can think of is if you guys don’t have children files for your widgets.

---

<div class="post-metadata">

**Author:** ![Lifefire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lifefire](https://forums.unrealengine.com/u/Lifefire)\
**Post date:** [October 14, 2016, 4:31am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/34 "2016-10-14T04:31:38Z")

</div>

That must be it, but how do you make a child of a widget blueprint without losing the widget part of it?

Edit: i did a “verify” and it started working on my original file, i also created a child too and they both work… thank you Huston850

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 14, 2016, 1:32pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/35 "2016-10-14T13:32:14Z")

</div>

And how did you do that exactly Livefire

---

<div class="post-metadata">

**Author:** ![Lifefire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lifefire](https://forums.unrealengine.com/u/Lifefire)\
**Post date:** [October 14, 2016, 5:30pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/36 "2016-10-14T17:30:43Z")

</div>

on the dev kit launcher, click the setting button next to Launch, it will open a drop-down menu, then click verify

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 14, 2016, 6:11pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/37 "2016-10-14T18:11:53Z")

</div>

> [@Lifefire;609134](#):
>
> That must be it, but how do you make a child of a widget blueprint without losing the widget part of it?
> 
> Edit: i did a “verify” and it started working on my original file, i also created a child too and they both work… thank you Huston850

Same as making a child of anything else. Click it and drag it to your folder, then create child. A child of a widget just handles some information, so they come out as two different file types.

---

<div class="post-metadata">

**Author:** ![RG\_Puma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RG\_Puma](https://forums.unrealengine.com/u/RG_Puma)\
**Post date:** [October 14, 2016, 11:49pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/38 "2016-10-14T23:49:54Z")

</div>

I do not understand exactly what you mean

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c5769c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c5769c1](https://forums.unrealengine.com/u/anonymous_user_2c5769c1)\
**Post date:** [October 15, 2016, 3:09am UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/39 "2016-10-15T03:09:22Z")

</div>

Sorry to go a bit off-topic from the original post;

Does anyone know how to setup the bindings so that I can make a dynamic player list through this technique? I’ve been trying to create a player list of buttons; I can retrieve the actual list without difficulties, it’s just binding the buttons so it works dynamically that I’m having issues with.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Huston850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Huston850](https://forums.unrealengine.com/u/Huston850)\
**Post date:** [October 15, 2016, 5:33pm UTC](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976/40 "2016-10-15T17:33:16Z")

</div>

> [@RG\_Puma;609551](#):
>
> I do not understand exactly what you mean

You should have two files: “ThisWidget” the white file, and “ThisWidget\_Child” the blue file. To get the child file, you simply click your widget, drag it into your mod folder (should just be same folder), and click “Create Child Here”

> [@;609586](#):
>
> Sorry to go a bit off-topic from the original post;
> 
> Does anyone know how to setup the bindings so that I can make a dynamic player list through this technique? I’ve been trying to create a player list of buttons; I can retrieve the actual list without difficulties, it’s just binding the buttons so it works dynamically that I’m having issues with.
> 
> Thanks in advance.

How do you mean? You’re asking how to bind a player list and a button, but it’s only one question? Are you trying to use the same widget and rename the buttons depending on what you’re doing or something?

[Previous page](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976.md?page=1)

[Next page](https://forums.unrealengine.com/t/how-can-i-get-number-of-players-online/74976.md?page=3)
