View Single Post
  #3  
Old 02-03-2013, 04:15 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
You can't access arbitrary variables (e.g. clientr) of another player on clientside. That would require an enormous amount of data to be constantly synced to every player on the server (or at least in the same level).

Without knowing what your end goal is (would it make sense to do this stuff serverside?), you can always store the data you need in players' "attr" arrays. Those are accessible by other players in the same level (globally if you configure it in server options), although there are restrictions on the amount and format of data you can store.

If you want to ask the server explicitly for the data, you can use triggerServer, but instead of using "return" to send back data, you use triggerClient. There are some examples [here](http://forums.graalonline.com/forums...17&postcount=4).
Well I'm working on Zodiac's server, and this particular script plays a pretty major role. I can't exactly go changing everything up without everything breaking. I usually do the triggerserver -> triggerclient thing for stuff like this, but considering this is in a loop, which is triggered by another player's attack, means that I need to have some way to get this variable without leaving the loop. Unless there's a way to stop the loop where it is, access that information, and then resume the loop, the effect would only kick in after the next player attacks.

Quote:
Originally Posted by cbk1994 View Post
That would require an enormous amount of data to be constantly synced to every player on the server (or at least in the same level).
I mean like something that's accessed only when it's called for. e.g. temp.thing = findplayer("Dude").client.stuff; would basically do it's own triggerserver to determine the variable, then go back to the client again to set temp.thing. wouldn't that be feasible? I recall something like that being possible in one of the C languages.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote