Game Development Community

Bind vs bindCmd

by Tasty Green Pees :-, · in Torque Game Engine · 02/21/2006 (12:21 pm) · 3 replies

Can anyone explain the difference between "bindCmd" and "bind"?

#1
02/21/2006 (12:39 pm)
Bind takes a single function and passes to it a value to represent keydown and keyup (1 and 0)

bindCmd allows you to specify a different function for keydown and keyup as well as the values you pass to those functions.
#2
02/21/2006 (1:24 pm)
Thanks, LabRat. I think I'm understanding this whole thing better.

So as I understand it %val, in the function parameter refers to this value that is passed by bind to the specified function. Am I correct?
#3
02/21/2006 (1:26 pm)
Harold, could tell me what the last parameters in this is:
moveMap.bindCmd(keyboard, "ctrl s", "commandToServer('playCel',\"wave\");", "");


Could you also explain the syntax of this thing aswell..

'playCel',\"wave\"

Thank you.