Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
ChameleonRocketGames

Network Player spawns twice?

Question

Hey guys, I encountered a problem : I got the M2H Networking project and converted the FPS Kit MP to the M2H one.. And when my friend joins me through hamachi etc. then he will spawn twice... He can only control one character and the other one is like it was another player but not doing anything. 

 

I haven't changed anything on the code. I tried reimporting the tutorial and ran the Example 4. It's the same there...

 

Got any idea :/? Thanks in advance :d

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts


  • 0

Did you add any kind of spawning system as an add on? Is it possible your spawning when connecting and spawning from a button or spawn delay?

Share this post


Link to post
Share on other sites
  • 0

The player spawns when he connects to the server. No other script or button that makes it spawn. Except for one script but I made it every time you die, there will be a button called respawn and then will instantiate the player again. But I tried deactivating it but still same :-\

Share this post


Link to post
Share on other sites
  • 0

Comment out the network instantiation in the OnConnected function. If it instantiates a player, you have an extra instantiation somewhere, if not, your OnConnected function is doubling the instant

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

I think that did it. I commented out the spawn one and created another script when the player enters the game he will then see a button which says "spawn" . Then the player spawns normally as one. But for some reason, the host can see on the score board that there are 3 players (me and two of same copy). but the other player is gone so it doesnt disturb the zombies when randomizing character to pick/attack. 

 

Thanks Ocular, much obliged! :d

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...