x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Get Controller Index Multiplayer

I'm trying to call an event when the player overlaps the collision to switch the camera to the blueprint of a specific player on the multiplayer server but the event is calling only for the client1 which is player index = 0, Get player controller index = 0 independent of which client being 2,3,4 ... overlaps the collision only the client 1 responds

Any solution?

alt text

Product Version: UE 4.21
Tags:
index.jpg (136.5 kB)
more ▼

asked Dec 06 '18 at 01:37 AM in Blueprint Scripting

avatar image

TheSubZer0
114 7 11 16

avatar image LucentStar Dec 06 '18 at 01:54 AM

Can I know what is your setup? If you are single local player then its always set to 0. If you have more Players playing local together they have Player Controllers with different indexes, like 0-3.Can you try to use "Get Controller" instead of "Get Player Controller". it might work for you if you have an indicated controller for an specific actors.

avatar image TheSubZer0 Dec 06 '18 at 02:59 AM

Yes there are more than 1 player on the same network but I do not know how to get a specific player's controller when calling the event.

avatar image TheSubZer0 Dec 06 '18 at 03:07 AM

Worked!!!, thanks a lot!

avatar image LucentStar Dec 06 '18 at 04:27 AM

haha.. i posted it as comment.. well goodluck in your project.. im might not that helpful but its great that someone resolves it for you..

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Mar 08 '19 at 11:31 PM by TheSubZer0 for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

You need to get the Controller of the player overlapping the collision, and use that.

Since you're calling it on the server, player index 0 will always be the 1st player that got in.

alt text

You need a dynamic pointer to whatever PlayerController possesses whoever overlapped the box.

captura.png (111.9 kB)
more ▼

answered Dec 06 '18 at 02:48 AM

avatar image

Evigmae
1.7k 8 3 8

avatar image TheSubZer0 Dec 06 '18 at 03:01 AM

And how do I create a dynamic point in the blueprint Player controller?

avatar image Evigmae Dec 06 '18 at 03:15 AM

There's no need, UE4 does if for you ;)

avatar image TheSubZer0 Dec 06 '18 at 03:07 AM

Worked!!!, thanks a lot!

avatar image LucentStar Dec 06 '18 at 04:28 AM

Thumbsup..

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question