playMaker

Author Topic: Anyone solved using TNet with playmaker? [SOLVED]  (Read 1688 times)

choarrim

  • Playmaker Newbie
  • *
  • Posts: 3
Anyone solved using TNet with playmaker? [SOLVED]
« on: October 26, 2016, 02:55:37 AM »
I have tried using the PUN network but finding it a bit too laggy for my taste, but before playmaker I used TNet which worked pretty well.

But since TNet doesn't have any official support for playmaker its a bit tricky to code it to work. Has anyone solved this? Maybe giving me some coding hints?

Also if this doesn't work that well, do anyone have any other multiplay solution that is working well with playmaker?
« Last Edit: October 27, 2016, 03:47:04 AM by choarrim »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Anyone solved using TNet with playmaker?
« Reply #1 on: October 26, 2016, 05:41:33 AM »
Hi.
If you have some coding experience maybe you can make actions for it.

you can check out this topic how to make custom actions.

I you do not know how or don't have time for it you can try asking in the Action Request section or you can try to ask to the author from tnet if he could add PM actions for it.
Many authors are willing to do so these days, since playmaker has many users.

choarrim

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Anyone solved using TNet with playmaker?
« Reply #2 on: October 26, 2016, 05:46:54 AM »
yeah I have already started doing some work into creating own actions, but the the main problem is that TNet searches on the gameobject for a function name and has the tag "[RFC]" on it.
So as far as I have come, it seems as if I must rewrite the execute function in TNet to also check in playmaker states after a target state.

choarrim

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Anyone solved using TNet with playmaker? [SOLVED]
« Reply #3 on: October 27, 2016, 03:46:47 AM »
I might have solved this, although so far not as generic as I would have hoped.

First thing, I created a new method "ExecuteState" in TNObject.cs, which would work almost as "Execute", but this would set a target state as well as any variables.

Then I made a simple new action which would call the TNObject.Send
ex: theObject.Value.GetComponent<TNet.TNObject>().Send("MovePosUpdated", TNet.Target.AllSaved, stateString.ToString(), targetVector.Value);

Important thing is that the state and the 1st parameter in TNObject Send needs to be the same.

If you want me to explain this further, don't hesitate to ask :)