The FSM name is actually optional (you can see that in the tooltip if you hover over the field). If none is specified, Playmaker will just grab the first FSM it finds on the target object. Just to be sure though, I did try it with the name in there, and it made no difference.
If you look closely at the images, you can see in the debug fields that the int is actually being passed:
- Random Int generates a 5.
- Network Instantiate spawns the object called "Pickup(Clone)" at the spawnpoint "Pickupspawn".
- Set Fsm Int does "Set Value" of 5 on the Game Object "Pickup(Clone)
- Int Compare gets the value of 5 (note the debug field under "integer 1" in the second screenshot
The value of the variable "testInt" is set to 0 by default, so if it wasn't receiving the number, there would be no way it could be changed to 5.
So even though I can see right there that "integer 1" has a value of 5 and "integer 2" has a value of 1, it's returning a result of "Less Than", which can't be. I've run it multiple times with different values, and even if Integer 1 and Integer 2 match, it always returns with the result of "Less Than". If the Less Than event field is left blank, then nothing happens at all. The FSM just sits in this state.
To try to debug, I went back and created everything step-by-step, adding one thing at a time and testing. If I do the same setup and use "Create Object" instead of "Network Instantiate", it works perfectly. Once the Network Instantiate action is added, it stops working, which is weird, because with the above example, you can see that the value is actually getting passed, it's just not evaluating correctly.
Since the Int Compare action will only accept integers, I would guess that Set Fsm Int is actually sending the integer correctly, otherwise the testInt variable wouldn't allow it to be stored there and Int Compare wouldn't accept it. I'm also guessing that if there was some kind of type mismatch, that the value of "Integer 1" in the Int Compare action would be either blank or 0 or that it would complain.
I hate to cry "code bug!" every time something doesn't work for me because I do realize I'm pretty new with playmaker, but I'm stumped as to what else this could be. I've also looked at the code for the actions and with my limited knowledge, I didn't see anything obviously wrong with anything, but I'm definitely not a coder. I guess the next step is for me to "hard code" this example with C# scripts instead of using Playmaker and see if I can get it to work. Maybe it just a bug with Unity's networking and nothing to do with Playmaker at all.
Let me know if you have any other thoughts or suggestions and I'll try to test them out.