playMaker

Author Topic: Unet Send Command Event  (Read 2105 times)

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Unet Send Command Event
« on: June 17, 2017, 09:03:53 AM »
Hello,

First time i'm trying the Unet Objects wich seams easy to understand first when you follow docs from unity with traditionnal scripts,

but to convert it to playmaker logic it's a bit different, or i missed something important about when i have to use Command to send order to server like descibed in the doc here:

https://unity3d.com/learn/tutorials/topics/multiplayer-networking/adding-multiplayer-shooting?playlist=29690

so actually i can create simple player, make it  move and rotate, change color...
but when it's time to make it fire bullets, i don't get the point with the action "Unet Send Command Event".

here is attaced 3 screenshots of this simple actions used, first when player use "space key"
go to Unet command
create the bullet

the best behavior i can get from both side, is just spawning 1 bullet, freeze during fiew seconds, and restart with undreds of instancied bullets in random directions...
« Last Edit: June 17, 2017, 09:16:46 AM by blackant »

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Unet Send Command Event
« Reply #1 on: June 17, 2017, 12:22:00 PM »
i get something,

now the bullet is instanciated on the server part, but there is actually no bullet on the client side...

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Unet Send Command Event
« Reply #2 on: June 17, 2017, 03:29:17 PM »
i have got a new clue, with this time a problem because Unet Send Command Event is based on a global event result, and it explain why all the players from the server are spawning bullets without my permission... >:(

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Unet Send Command Event
« Reply #3 on: June 17, 2017, 03:53:05 PM »
And after fiew more tweeking:
Client: move rotate and fire OK, sended normally to server OK

Server: Move rotate sended to client, not fire.

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: Unet Send Command Event
« Reply #4 on: June 18, 2017, 04:56:31 AM »
i would advise you use photon, unet and playmaker isn't as good and supported as photon and playmaker, and photon is also cheaper

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Unet Send Command Event
« Reply #5 on: June 18, 2017, 10:49:53 AM »
Thanks for your advice i'll take a look about photon,

but for now i made a little video to understand how unet is working and from where the problem can come...

it may help some users to reproduce the first part and maybe help to debug.

https://www.youtube.com/watch?v=XlV4DKveSoE

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Unet Send Command Event
« Reply #6 on: June 19, 2017, 07:19:12 AM »
Hi,

 yes, I don't recommend using uNet unless you know it very well already which then is paradoxal with using it for the first time.. I agree. uNet is simply too complex for beginners and adding PlayMaker layer on top which hides away the api makes it even harder...

uNet support for PlayMaker is meant as a base to expand on features and so scripting is likely mandatory to fully grasps all the small details and the inherent complexity of uNet architecture, let alone the cost of running it...

Bye,

 Jean