- Home /
I cant kill the other player.
So i have a multiplayer game i am working on, i got every thing working fine now only one problem that i have got a few days now.
I can see other bullets fly, they bounce whay from player 2 if i shot with player 1.
But it dont reduce the life...
var Bullet:Transform;
function OnControllerColliderHit(hit : ControllerColliderHit) { if(networkView.isMine) {
if(hit.gameObject == Bullet)
{
Statics.Life -=4;
}
Debug.Log("Test: "+hit.gameObject.tag);
}
}
The "Test" only tells me that i touch the floor...
Answer by DaveA · Mar 17, 2011 at 10:53 PM
I take it this script is on the player? Have you assigned Bullet to the instance of the bullet coming in?
Perhaps a better way would be to tag Bullet's with a new tag (say, Bullet) and check the tag of the hit.gameObject to see if is tagged Bullet (if so, decrement life)
This is on the player and i have assigned the bullet, have tried different names and with out nothing helps, its dus not even show collistion when its just fall of or bounce from player
Your answer
Follow this Question
Related Questions
Network View mess up colliders? 0 Answers
Problem with identifying players in network 1 Answer
Deleting a player over the network 1 Answer
Player-Network-Bug 1 Answer
Spawning Player 2 through network and giving it access to another script 0 Answers