Announcement

Collapse
No announcement yet.

Using RPC to tell clients to hide all network players but self

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using RPC to tell clients to hide all network players but self

    Hi, and sorry for the (probably?) cryptic title

    I have a very conceptual Project going on but there is some BP-logic that I can't wrap my gray matter around:
    I want every player to be visible serverside but only the local player should be visible clientside.

    To prevent hacking/cheating this functionality has (?) to be implemented using RPC triggered from serverside and this is what I have in mind:

    (BP-Code is in Player Blueprint)
    Code:
    On Event Begin Play;
    Switch Has Authorit;
    if( Authority ) { DoNothing; }
    if( Remote) 
    {
     if( IsLocalPlayer ) {DoNothing; }
     else { Set Actor Hidden In Game on Self }
    }
    Am I totally out in the blue on this?
    Last edited by Wixner; 02-09-2015, 02:39 AM.
    Primary Project: ZMRA Slayers - Zombie Mutant Robot Animal Slayers
    Projects: Antarctica, NVSBL, To the End of the Rainbow, Madness, The [num] Pages of Adventure

    #2
    I dig get this to work with a blueprint following the pseudocode above.
    Haven't got access to my workstation so I can't post the solution at the moment though
    Primary Project: ZMRA Slayers - Zombie Mutant Robot Animal Slayers
    Projects: Antarctica, NVSBL, To the End of the Rainbow, Madness, The [num] Pages of Adventure

    Comment


      #3
      There are options for the mesh component called OnlyOwnerSee and OwnerNoSee that achieve the effect you're looking for.

      Comment

      Working...
      X