playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kropcke

Pages: [1]
1
Playmaker Help / Networking global variables via collisions VS. mouseclicks
« on: December 04, 2018, 09:37:02 AM »
Hi All.

I have a question about networked global variables, and setting them ingame via collisions VS. mouseclicks.

For my network test, the LAN Host is running inside my Unity Game window, while  a build of that scene is connected to it using LAN Client. The orange ball on the left is controlled by the LAN Host (on the left), and the orange ball on the right is controlled via the LAN Client (on the right). (see below)



When I move either ball into the green rectangular trigger, the global variable var_tr_1a is set to '1'. The red box at the bottom turns green whenever var_tr_1a is set to '1'. The global variable var_tr_1a is responding to collisions via the 'Trigger Event' Action in an FSM within the orange ball. (see below)



I also have the green rectangular trigger set to respond to Mouse Pick Events, specifically Mouse Down and Mouse Up. This is also achieved through an FSM in the green trigger. In the screenshot below, I'm mouseclicking on the green rectangular trigger in the LAN Client to the right. The global variable var_tr_1a only gets set to '1' here. You can see the value of var_tr_1a is still '0' on the LAN Host to the left. (see below)



At this point, I feel like I'm heading a bit too far down the rabbit hole and am losing track of what changes I'm making really matter in helping to resolve this: updating global variables across the network using both collision (which is working) and mouseclicks (which is currently not working).

  • the orange ball, the green trigger, and the red/green square are all prefabs that I'm spawning
  • they all have a network identity (that has been set and reset to every combination of local and server authority I can think of)
  • my network manager is spawning the orange ball as the player prefab
  • the green trigger and red/green square are both registered spawnable prefabs
  • the eventMouseUp and eventMouseDown events on the green trigger are global events, and I Broadcast All using a Send Event action in its FSM
  • the orange ball prefab has a player script attached to it that is not associated with an FSM. It has some ClientCallback and Command calls that I'm not familiar with, but am wondering if this is affording the orange ball something that the other two prefabs are missing out on?

Please let me know if you have any ideas, or if there's something else I haven't yet considered that you think I should give a shot. I really appreciate any advice you might be able to share.

Sincerely,
kropcke

Pages: [1]