playMaker

Author Topic: Issues with PhotonNetwork.Instantiate creating an extra clone  (Read 2419 times)

gmanka@ymail.com

  • Playmaker Newbie
  • *
  • Posts: 2
Hello, And thank you in advance for any help regarding the matter.

I will go into more detail if needed but this is just a quick overview of the issue to get started. I hope one of the mods here can allow me to make a video and send it privately should the issue not be a simple one.

Ok - The problem is simple. With 2 players in a match- I have a unit (controller x) that is instantiated over the network, this one works perfectly as it retains variables and spawns by its self in the right location etc. It instantiates additional units that then follow/shoot at designated targets (unit y). The weapons fired can be (projectile z). X works perfectly, z even works perfectly, but y created a clone at 0,0,0 cords with no vars filled in.

Additionally photon view states that they are not controlled by the player who created them.

Now, I've spent the last 2 days just fixated on fixing the issue with no luck. going through posts  on multiple forums and the closest thing I found was someone who had a glitch with creating game objects and them not instantiating in the correct location.

I have tried altering parameters. changing the location of the spawner FSM to a subset of the main prefab. I have tried changing dozens of things and have simply hit a brick wall I cant over come and need help... What would cause a Photon instantiate to create a second clone not controlled by the creator? There is no difference in the way unit y is setup then x or z but yet this one just goes wrong.

I know its somewhat vuage, but I can offer more details as needed, if anyone has see this and can offer insight as to why this is happening it would be of great service.

Thank you,

Gaspar

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Issues with PhotonNetwork.Instantiate creating an extra clone
« Reply #1 on: June 27, 2015, 03:05:50 AM »
Hi,

 It looks like somewhere in your logic you are instantiating this clones.  if x and z works, and y doesn't, then typically, isolate y and make a special scene to see if the bad behavior persists and then you can track it down, don't try to debug in your full game, this will be too much.

IF y works on its own in a scene, then it's definitly a problem of logic in your game, and you'll need to patiently analyze and put debug log in the actions you use to instantiate everything, this would be how I would start, edit the action to log everytime you instantiate something, and then compare with what's in the world.

Bye,

 Jean