How do I create a waypoint that only my team sees?
I imagine that this would really depend on the specifics of your project. Without knowing how you’ve made your waypoints and pawns, I’m not sure there’s much people will be able to do to help. But I’ve been wrong before.
Here’s how I would probably do it:
1. Make a ‘Waypoint’ struct. This would contain any relevant information about the waypoint, like its location (or transform if you need all that info), name, color, shape, tags, etc. Whatever you need from a waypoint.
2. In a team blueprint, or similar, make an array or map of Waypoint structs. Somewhere in the same blueprint, or one similarly accessible, have a list of all players on the team. Alternatively, give each player a variable that corresponds to their team.
3. When a player makes a waypoint, add a Waypoint struct with its information to the array or map of Waypoint structs.
4. Call an update function on all clients on the team, looking for changes to the list of Waypoint structs. On each client, either destroy all waypoints and spawn new ones from the list, or include a unique name or tag for each, and verify all the info for each existing waypoint, spawning new ones when necessary.
This method would go around the whole issue of replication, and should make it so that players can’t access waypoint info they shouldn’t be able to, since you could put checks for that in the getter for the Waypoint struct array/map. If you just replicated the waypoint across all clients, you’d have to change its visibility for each player, and I don’t really know if you can. Probably, but I don’t know. Also, you could potentially just skip the list, making the data entirely inaccessible to other teams by iterating through the team’s players and calling the function that spawns a waypoint for each of them directly. The downside to that would be that if something got buggy at all, there wouldn’t be a way to reference the list of waypoints, and that would be highly inconvenient. I’d probably go for the first way, if I was doing it.
I haven’t done a lot with replication, and there are probably more standard (and more secure) ways of doing this. This is just one way it probably could be done.