Hi,
Wondering if it's possible to retrieve a value from another local session's specific global variable?
I'm running one identical scripts on several EQ2 clients and would like to get the variable value from each and one of the "other" sessions.
Thanks in advance.
Getting variable value from "other" sessions
Moderators: Lavish Software Team, Moderators
I prefer LavishScript development questions over on ismods.com, but np.
Inner Space does not build in a mechanism to pull the value of a variable from another session. There is no way to do something like ${Session[123].Variable[xyz]} because this would force inter-process waiting during something you may intend to be atomic.
However, there is no reason you cannot use Relay to asynchronously pass values as needed. For example, you don't necessarily need to retrieve the value if your script pushes the value when it changes; and you can use a similar mechanism to tell a remote instance to push the value.. e.g. relay all some_important_variable_updated "${some_important_variable}" (noting that if some_important_variable_value is a string, you would want to use ${some_important_variable.Escape})
Inner Space does not build in a mechanism to pull the value of a variable from another session. There is no way to do something like ${Session[123].Variable[xyz]} because this would force inter-process waiting during something you may intend to be atomic.
However, there is no reason you cannot use Relay to asynchronously pass values as needed. For example, you don't necessarily need to retrieve the value if your script pushes the value when it changes; and you can use a similar mechanism to tell a remote instance to push the value.. e.g. relay all some_important_variable_updated "${some_important_variable}" (noting that if some_important_variable_value is a string, you would want to use ${some_important_variable.Escape})