Mouse bind not working ?
by Tiago Correia · in Technical Issues · 06/22/2007 (8:56 am) · 5 replies
I have implemented object selection with mouse, so i can use the mouse to place my player wherever i click in the world..
the selection is working i am able to display the bounding box, but on the client side
i tried a simple function to test the mouse bind and nothing happens:
function processClick( %val )
{
echo( "processClick ----------------------------------------" );
}
moveMap.bind( mouse, button0, processClick );
the mouse is responding to the onMouseDown from the TSCtrl, but i get no response from the client side script bind.. is it normal or am i missing something ?
what could this be?
the selection is working i am able to display the bounding box, but on the client side
i tried a simple function to test the mouse bind and nothing happens:
function processClick( %val )
{
echo( "processClick ----------------------------------------" );
}
moveMap.bind( mouse, button0, processClick );
the mouse is responding to the onMouseDown from the TSCtrl, but i get no response from the client side script bind.. is it normal or am i missing something ?
what could this be?
#2
Those two files are auto-generated by the engine during runtime, and designed to store player keybinds. First the defaults are loaded, and then config.cs is loaded on top (and erasing), which allows you to still provide developer defaults for keybinds, but also allows the player to re-map keys (which are then saved in config.cs automatically).
06/22/2007 (3:33 pm)
Actually, you should instead delete your config.cs and your config.cs.dso files whenever changing keybinds.Those two files are auto-generated by the engine during runtime, and designed to store player keybinds. First the defaults are loaded, and then config.cs is loaded on top (and erasing), which allows you to still provide developer defaults for keybinds, but also allows the player to re-map keys (which are then saved in config.cs automatically).
#3
I do not have a config.ds file, and i do have the the default.bind.cs file. the code above is in default.bind.cs file.
Keyboard bindings are working, i just dont get response on the mouse clicks from the client side.
I'm using static camera from advanced camera resource. anyway this could be the problem ?
06/25/2007 (1:21 am)
Good morning,I do not have a config.ds file, and i do have the the default.bind.cs file. the code above is in default.bind.cs file.
Keyboard bindings are working, i just dont get response on the mouse clicks from the client side.
I'm using static camera from advanced camera resource. anyway this could be the problem ?
#4
i binded a key to set Curson On and Off..
my client side default.bind.cs calls to mouse click do happen when the Cursor is set to OFF
and the playGUI.cs onMouseDown() calls happen when the Cursor is ON..
is this right ? how can i be able to have cursor on and be able to bind mouse on client side scripting, and be able to do commandToServer calls ?
thanks
06/25/2007 (1:46 am)
Ok here's what i found out..i binded a key to set Curson On and Off..
my client side default.bind.cs calls to mouse click do happen when the Cursor is set to OFF
and the playGUI.cs onMouseDown() calls happen when the Cursor is ON..
is this right ? how can i be able to have cursor on and be able to bind mouse on client side scripting, and be able to do commandToServer calls ?
thanks
#5
i binded a key to set Curson On and Off..
my client side default.bind.cs calls to mouse click do happen when the Cursor is set to OFF
and the playGUI.cs onMouseDown() calls happen when the Cursor is ON..
is this right ? how can i be able to have cursor on and be able to bind mouse on client side scripting, and be able to do commandToServer calls ?
thanks
06/25/2007 (2:05 am)
Ok here's what i found out..i binded a key to set Curson On and Off..
my client side default.bind.cs calls to mouse click do happen when the Cursor is set to OFF
and the playGUI.cs onMouseDown() calls happen when the Cursor is ON..
is this right ? how can i be able to have cursor on and be able to bind mouse on client side scripting, and be able to do commandToServer calls ?
thanks
Torque Owner GAMEHACK3R
moveMap.bind( mouse, button0, processClick );
to your client\config.cs
you have to add your bind to the
client\scripts\default.bind.cs
and
client\config.cs
for a key binding to work .
just add the bind to the bottom of the config.cs if you havent and the bind will work