Game Development Community

Non-Remappable commands

by Jeff Trier · in Torque Game Engine · 03/09/2003 (4:09 pm) · 1 replies

I am learning how to change the controls via the GUI and I am having some good luck.

But I can't figure out what I am doing wrong to some of these commands that is making them "non-remappable" in game.

Any help on this would be great!

EDIT: FYI, I am trying both Bind and BindCmd as per this tutorial: http://tork.zenkel.com/tutorials/remap/remap_functions.html

Thanks,
-Jeff

About the author

Originally a Classical/Metal musician, I've always been attracted to anything involving computers, including: Networking, PC Building and Repair, software design and coding. I've been involved with game design and development for over 10 years.


#1
03/10/2003 (5:56 am)
Ok with some help on the chat I got it figured. In case anyone else comes up with this problem, the solution was...

(In my example to spawn a car)
In Config.cs I made:
moveMap.bind(keyboard, "space", DeployKey);

In default.bind.cs I made:
function DeployKey(%val)
{
if(%val)
commandToServer('AddCar');
}
moveMap.bind(keyboard, "space", DeployKey);

And in optionsDlg.cs I added:

$RemapName[$RemapCount] = "Deploy Object";
$RemapCmd[$RemapCount] = "DeployKey";
$RemapCount++;

It appears that if you don't have your key point to a function, which calls your main function, you will get the "Bound to non-remappable key" message. I suppose it's because the %val stores the malleable key.

This is probably a no brainer to most of you folks, but I figure there must be more "no brainers" like me out there who can benifit from that info. lol

-Jeff