# How cast Players in local multiplayer

**URL:** <https://forums.unrealengine.com/t/how-cast-players-in-local-multiplayer/426010>\
**Category:** Multiplayer & Networking\
**Tags:** casting, cast-to, unreal-engine, local, Multiplayer, Blueprint, question\
**Created:** [May 26, 2018, 9:13pm UTC](https://forums.unrealengine.com/t/how-cast-players-in-local-multiplayer/426010 "2018-05-26T21:13:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charditronic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Charditronic](https://forums.unrealengine.com/u/Charditronic)\
**Post date:** [May 26, 2018, 9:13pm UTC](https://forums.unrealengine.com/t/how-cast-players-in-local-multiplayer/426010/1 "2018-05-26T21:13:51Z")

</div>

Hello my masters! I was searching in the documentation, but I’m not sure how can I do.

I have an Enemy. When this enemy is near the Player, he follow him. To do that, I do a “Cast To”, but only can cast a player, and obiously , only follow the player 1.

How can I cast all the players in game? ( In this case, 2 local players)

 ![242270-asdf.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/6/5d63378589c06f88f28eb8bc5ce9f799e42b7897.jpeg)

I think I can get an arrow from “Cast Failed” and do another “Cast To” but this time changing the number of “Get Player Pawn”. But do this every time I need to do a “Cast To” it’s crazy, or not?

---

<div class="post-metadata">

**Author:** ![Charditronic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Charditronic](https://forums.unrealengine.com/u/Charditronic)\
**Post date:** [May 27, 2018, 12:48am UTC](https://forums.unrealengine.com/t/how-cast-players-in-local-multiplayer/426010/2 "2018-05-27T00:48:22Z")

</div>

I solved the problem doing a new integer variable conected to the Player Index.  
In the Event Tik checks which player is closest. Is Player 0 is closer, the variable is 0, else the variable is 1.

Anyway, if someone know a best way to do the cast for multiple player It clarifies many doubts
