|
When I network.Instantiate a mob on one computer, and another computer logs in, the object is where it should be. However, if that mob is destroyed with network.Destroy, and another computer logs in, the other computer still sees that mob. What am I doing wrong? (This is the important parts of the spawner code)
(comments are locked)
|
|
Network.Instantiate is buffered call Network.Destroy is not. so, if you join the scene after instantiate-destroy was called, you got only instantiate call and see the object. just clear buffer after destroying for future joins http://docs.unity3d.com/Documentation/ScriptReference/Network.RemoveRPCs.html http://docs.unity3d.com/Documentation/ScriptReference/Network.RemoveRPCsInGroup.html Do remove the rpcs of the destroyed object? The reference says remove for a network player but it is not a player. Do I have to trick it into thinking the mob is a player somehow?
Jul 30 '12 at 08:51 PM
SomeGuy22
http://docs.unity3d.com/Documentation/ScriptReference/Network.Instantiate.html http://docs.unity3d.com/Documentation/ScriptReference/Network.RemoveRPCsInGroup.html look for 'group' variable
Jul 30 '12 at 08:54 PM
ScroodgeM
But won't that remove all the mobs rpcs?
Jul 30 '12 at 09:45 PM
SomeGuy22
use group for object you want totally clean. this will not remove all the mobs rpcs from OTHER groups
Jul 30 '12 at 09:47 PM
ScroodgeM
So I have to change the group of one mob when it dies. How do I change the group?
Jul 30 '12 at 10:16 PM
SomeGuy22
(comments are locked)
|
