Key binding for use Health
by Howard Dortch · in Torque Game Engine · 02/04/2005 (8:58 am) · 2 replies
I wanted to be able to remap the h key to something else for using a healthkit. This is the origional bind.
moveMap.bindCmd(keyboard, "h", "commandToServer(\'use\',\"HealthKit\");", "");
I changed it to this:
movemap.bindCmd(keyboard, "f",getHealth);
and the function getHealth looks like this:
function getHealth(%val)
{
if(%val)
commandToServer('use',"HealthKit");
}
I get a console message on the command to server line ActionMap::bindCmd - wrong number of arguments.
the function on the server side in inventory.cs is where I think this calls and has this :
function serverCmdUse(%client,%data)
can anyone tell me what arguments I can add to make this quit complaining?
moveMap.bindCmd(keyboard, "h", "commandToServer(\'use\',\"HealthKit\");", "");
I changed it to this:
movemap.bindCmd(keyboard, "f",getHealth);
and the function getHealth looks like this:
function getHealth(%val)
{
if(%val)
commandToServer('use',"HealthKit");
}
I get a console message on the command to server line ActionMap::bindCmd - wrong number of arguments.
the function on the server side in inventory.cs is where I think this calls and has this :
function serverCmdUse(%client,%data)
can anyone tell me what arguments I can add to make this quit complaining?
#2
02/04/2005 (9:40 am)
Good catch .. copy and paste monster had me, it was correct in the config file. thanks....
Torque Owner Gonzo T. Clown
movemap.bind(keyboard, "f",getHealth);