How to render pawns for a specific client only?

i need to create a team-based visibility system

i have two teams, and i want to make all teammates visible for each other, but invisible for another team members, to reveal enemies in a close range only

i’m struggling at a first stage, i set pawns to be “Hidden in Game” by default, but i cant find a way to render pawns to a specific client only

i use a custom event for owning client, to reveal teammates, but both teams reveals anyway, when pawns of the opposite team is spawned

so, how can i render pawns for specific client only (and other clients in his team), and hide it from other clients of the opposite team?
and later, reveal the pawns of the opposite team in a vision range?

Are they not supposed to bump into each other?

use SetVisibility on Client, hidden in Game seems to replicate.

also use repnotify otherwise client who join late or havent loaded wont work

2 Likes

its dont work, mesh component is set to not replicate, but replicates anyway

for visibility? works for me ive done it in my project, can we see your code?

yes, u can, screenshot included in a first message

thats using setactorhiddiningame, setvisiblity is a different function


just tested on mine and still works. im on 5.2 but doubt its changed

which means its more likely the logic thats wrong.

try this create a debug key and just toggle SetVisibility, it should work and only work on the client who pressed the key

dont work at all, i tried many variants
mesh replicates anyway

This should be called on execute on all.


Looks like this:

1 Like

thank you, “Executes on All” and this double Branch check is working, as needed :+1:t2:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.