Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: blackant on June 17, 2017, 09:03:53 AM

Title: Unet Send Command Event
Post by: blackant 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...
Title: Re: Unet Send Command Event
Post by: blackant 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...
Title: Re: Unet Send Command Event
Post by: blackant 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... >:(
Title: Re: Unet Send Command Event
Post by: blackant 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.
Title: Re: Unet Send Command Event
Post by: Ofonna 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
Title: Re: Unet Send Command Event
Post by: blackant 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 (https://www.youtube.com/watch?v=XlV4DKveSoE)
Title: Re: Unet Send Command Event
Post by: jeanfabre 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