Author Topic: Firing state via RPCs only occurs on host?  (Read 4573 times)

thelebaron

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Firing state via RPCs only occurs on host?
« on: February 17, 2014, 04:38:59 PM »
I have an RPC to send the firing state but it only seems to register on the host to client but not client to host, when the client fires nothing happens

 tno.send("Fire", Target.All);

So Im just going by what was mentioned here(http://www.tasharen.com/forum/index.php?topic=6728.msg31607#msg31607), actually its just the firing state not the on/off but anyway it only seems to register on the host. the full code is a little convoluted as Im trying to get it to work with ufps. I know it doesnt seem like much to go on, but is there something completely obvious I am missing in doing this?


let me just modify this by adding is this something to do with having subobjects of the main gameobject having tnobjects which dont seem to get an assigned number?
« Last Edit: February 17, 2014, 05:56:40 PM by thelebaron »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Firing state via RPCs only occurs on host?
« Reply #1 on: February 18, 2014, 11:17:21 AM »
Nested TNObjects use the ID of their rootmost TNObject. From your description it just sounds to me like the message never actually arrives, so I'd start looking at that. Try simplifying the hierarchy you have, and making the TNObject with this script be on its own rather than a child of another TNObject.

thelebaron

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Firing state via RPCs only occurs on host?
« Reply #2 on: February 18, 2014, 12:05:51 PM »
The thing is it doesn't work(host to client) if I disable the code so the message is getting through at least one way. I'll give simplifying a try though

thelebaron

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Firing state via RPCs only occurs on host?
« Reply #3 on: February 19, 2014, 10:47:33 PM »
edit: ok so can the tno.Send part be split to a different scripts RFC it calls? just tried it with two different scripts that weren't referenced to each other and I guess it doesnt work?

Doing as you said does work, with the send and RFC both on one of the parent scripts.

Any insights as to why when put further down the hierarchy might only allow for host --> client messages?
« Last Edit: February 20, 2014, 03:22:21 AM by thelebaron »

thelebaron

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Firing state via RPCs only occurs on host?
« Reply #4 on: February 20, 2014, 05:03:03 AM »
nevermind I got it working with some rejigging, although tbh im not even sure why it works vs before