Game Development Community

Behavior of custom action map and global action map

by Rob Segal · in Torque Game Builder · 08/07/2006 (1:01 am) · 3 replies

Trying to get a custom action map to work with the mouse but am running into some problems. The first code line I have here doesn't work...

playerMap.bindCmd("mouse0", "button0", "$playerKitty.Shoot(1);", "$playerKitty.Shoot(0);");

The following does...

GlobalActionMap.bindCmd("mouse0", "button0", "$playerKitty.Shoot(1);", "$playerKitty.Shoot(0);");

Now I can understand the second one working because I am overriding the global action map but I really don't want to do that and I should be able to overwrite mouse actions just fine with a custom action map. Thoughts?

#1
08/07/2006 (3:24 am)
Probably daft, but you have pushed the playerMap?
#2
08/07/2006 (4:44 am)
I seem to be having the same problem, and pushing the custom actionmap doesn't seem to be making any difference. Keyboard input works fine with custom actionmaps, but if I try and use mouse or joystick input with them, it doesn't respond at all.
#3
08/08/2006 (8:51 pm)
Yep I got the push in there Phil. The problem as Ben describes it pretty much sums things up. I'm thinking it could be the build of TGB I'm using. It's RC 1.1 . Going to give the latest build a whirl and see what kind of results I get.