Game Development Community

¿ how to filter user inputs for commandToServer('myCommand') ?

by Javier Canon · in General Discussion · 10/04/2009 (3:13 am) · 2 replies

hi, i was thinking about it, torque filter user inputs or client call inputs when the client call a server side function with commandToServer('myCommand')?

example: you have a GUI button with the commandToServer('myCommand') and the user clicks many times rapidly...

this situation don't generate unnecessary network traffic?

#1
10/04/2009 (11:43 am)
You can bind this with a timer (look at schedule) to make the button active / not active during few milliseconds / seconds in order to avoid your exact scenario.

Except this work-around, I do not see something preventing it.
#2
10/05/2009 (9:03 pm)
ok thanks frank, if torque dont have a standard default method i think that other option is onclick:

disable button
commandtoserver
commandtoClient to activate the button again

thats depends on your goals.