- Home /
help with network controling
Hi people. i know this is kinda of a big request but if anyone could take the time to look at my project and tell me what i must do to make it work it would soooooooooo awesome. see i'm trying to create a simple multiplayer fps game and for some reason when i connect with two or more players they switch between cameras like 5000 times a seconed and when ever i move one the other one moves too.
can someone pliz send me a fixed one or show me how to fix it because i've been trying this for a long time and i dont know what else to do.
huge thanks.
(here is the download link to my project http://www.mediafire.com/?a6gg9be9ib3gbf1 )
Answer by TheDarkVoid · Aug 18, 2011 at 07:10 PM
i had the same problem when i first started with my game, first to fix the movement, simply do this
a function()
{
//add this code
if(networkView.isMine)
{
//code for this function
}
}
do this for all your functions make sure it surround all of the code in every function of your movement script and any other script that controls any kind of movement that is not attached to the camera.
next to deal with the camera,create a new java scipt and put this in the update function:
if(!networkView.isMine)
{
Destroy(gameObject);
}
if you need inspiration or want to see some of the mechanics that may help you in action feel free to check out my game[ http://dl.dropbox.com/u/28641623/Warzone_Data%20%282%29.zip ], i'll be happy to help you out with any other problems
thanks you helped me abounch, but just one more quick question: should i use CharacterController in moven't scripts for multiplayer games or will that cause problems?
i used character controllers, but you can use what ever you want.
Your answer
Follow this Question
Related Questions
Spectator Camera (Online) 0 Answers
How to put Networkview.isMine in mouselook 0 Answers
Multiplayer camera bug - Everyone sees what last joinen player sees. 0 Answers
Animal Crossing type game 1 Answer