- Home /
Having problem with making non networked objects only be intractable with local player
I am making a game that has a flag/base capture system where players can spawn at any base that belongs to their team. I am currently trying to make a shrine/portal which is just an object that the player walks up to and press E to bring up a list of all the bases that they can spawn at. It is working but the shrine is an object that has no networkidentity and is always in the scene not instantiated.
The shrine decides which list of bases to show the player based on the player objects tag which is checked with OnTriggerEnter and exit which is working but I realized this is making the script on the shrine react when ANY player is in range of it. So for example - When I am player1(team1) and a player from team2 approaches a shrine the shrines script activates for both player1 and 2.
I have been trying to think of a way to avoid this and all I can think of is instantiating the shrines when the player joins but not instantiate it over the network so everyplayer has their own shrines in their scene. Would this be a good solution or is there a better way to do this?
I was also thinking of giving the shrines a netid and trying to use something like "isClient".
Your answer
Follow this Question
Related Questions
Instantiated object from client player not moving when spawned. How can I fix this? 0 Answers
Network.Instantiate issues - GameObject ownership and network views? 0 Answers
Instantiated objects not showing on new clients [uNet] 1 Answer
Objects instantiated by the host show on all clients but client objects don't show on host. 0 Answers
How can I spawn a GameObject on all players in my multiplayer game? 0 Answers