Drakath Posted October 12, 2014 Share Posted October 12, 2014 Can client-side return a value without triggering a server-side function again? For example, I execute a server-side function in which I need to get a distance between two objects. I trigger a client-side event which calculates the distance but how can it return that distance to my server-side function without triggering the whole function again? Link to comment
Moderators IIYAMA Posted October 12, 2014 Moderators Share Posted October 12, 2014 It can't be done, because of the network. Code can't wait for network traffic. You can pause the code if you want, but you still need to return the value back with another trigger and resume the code. The only trouble with that is, when a packet failed/serverside code failed, your code stays frozen and is still in the memory. The best thing you can do is using two functions. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now