[Closed] Replicate an actor reference/pointer
I am implementing a selection system in a multiplayer game. The player can click on an actor (client-side), and I want to call a meyhod of this actor on the server.
Problem is : how can I transmit the actor's reference over the wire ? Obviously a pointer can't work, what should I do ?
asked Apr 03 '14 at 10:59 PM in C++ Programming
The question has been closed Apr 28 '15 at 07:44 AM by Gwenn for the following reason:
The question is answered, right answer was accepted
You can actually refer to these as pointers over the wire :)
If this is a static actor (loaded with the level), it should just work. If the actor is dynamic (spawned during play), it will need to be a replicated actor, and relevant.
Assuming the actor is static or replicated, just refer to it as you normally would in RPC calls. If this is a property on an actor that refers to another actor, just mark that property as replicated.
Hope this helps!
answered Apr 03 '14 at 11:08 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here