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"

Setting the Event Begin Play to execute only on client

Hi, I've got a problem: when I spawn an actor with the Event Begin Play, the actor is visible to all clients. I want that the actor is visible only on the client that is spawned.

If I spawn the actor and attach it in a key press event, it works, but with the Event Begin Play, it doesn't work. How can I make it work?

In this screen you can see what I did:

alt text

Product Version: Not Selected
Tags:
screen.jpg (71.2 kB)
more ▼

asked Nov 07 '14 at 02:41 PM in Blueprint Scripting

avatar image

Scienziatogm
369 44 40 51

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

2 answers: sort voted first

Solved. I had to use C++ to change the Owner of the actor, so I made my function that can set the Owner in the Blueprints. Anyway thanks for the help.

more ▼

answered Nov 09 '14 at 05:21 PM

avatar image

Scienziatogm
369 44 40 51

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

Hey Scienziatogm-

In the components tab of your blueprint, select the actors mesh and type "Owner" in the search bar of the details panel. Make sure to check the option for "Only Owner See" to have the object appear for the player that spawned it and not show up for any other players.

Cheers

Doug Wilson

more ▼

answered Nov 07 '14 at 03:37 PM

avatar image Scienziatogm Nov 07 '14 at 03:39 PM

I already did it for Mesh 1P, but the problem is that the actor of class PistolBP is visible to all players.

avatar image Doug E ♦♦ STAFF Nov 07 '14 at 04:25 PM

Is the mesh associated with PistolBP set to Only Owner See as well?

avatar image Scienziatogm Nov 07 '14 at 04:39 PM

No, because if I set it to true, I can't see the mesh attached to the socket.

avatar image Doug E ♦♦ STAFF Nov 07 '14 at 05:12 PM

Just so I'm sure I understand your question, what is the behavior you're looking for? Are you trying to have the actor associated with PistolBP show up for the client that spawns it but not for other clients? Also, what exactly is Mesh 1P? What components make up the PistolBP actor?

avatar image Scienziatogm Nov 07 '14 at 06:51 PM

Mesh 1P is a Skeletal Mesh with a socket. I want to spawn an actor with the PistolBP and attach this actor to the Mesh 1P, but since Mesh1P and the actor are for the first person, other players must not see them. Only the player who owns the Mesh 1P must be able to see the PistolBP actor.

avatar image eXi Nov 08 '14 at 05:36 PM

Ok, but for this you normaly only need to change the "Only Owner See" bool.

bla

Why again can't you do this?

avatar image Scienziatogm Nov 08 '14 at 06:04 PM

Mesh 1P is already Only Owner See, but I need that the actor spawned in the Event Begin Play is visible only to the owner of the Mesh 1P.

avatar image eXi Nov 08 '14 at 09:23 PM

Ah, i'm such an idiot sometimes. I meant the Pistol. I don't know why i posted you the Mesh1P.

This should be what you meant or? I don't have a PistolBP at the moment, but it should be the same. Use "Get Mesh" with the return value and "Set OnlyOwnerSee" with the returned mesh.

Is this helping? I still don't know what you meant with

"No, because if I set it to true, I can't see the mesh attached to the socket."

Why can't you see the mesh? The owner should be able to see the Pistol Mesh.

bla

http://puu.sh/cICyk/f87ba604e6.png

avatar image Scienziatogm Nov 08 '14 at 09:50 PM

I did this, but I can't see the Pistol in the hand:

alt text alt text

avatar image eXi Nov 08 '14 at 10:00 PM

Hm ok, this is weird. So we are as far as Doug Wilson tried to help you.

Does this work if you start the game with only 1 Player? Maybe it's a replication thing.

.. I really need to learn more about the basics, so i can help you guys faster.. grr

avatar image Scienziatogm Nov 08 '14 at 10:10 PM

No, it doesn't work. Staff members also don't know how to reply. :(

avatar image eXi Nov 08 '14 at 10:45 PM

Don't give up (: Doug Wilson will sure look into this question again and with the additional information we got here, he will surely try to help you. I will keep the problem in mind. If i find a solution i will post it.

avatar image Scienziatogm Nov 08 '14 at 10:50 PM

Thanks for the help. I really need this to make a good game. Waiting for a reply from the Staff.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question