Question about binds
by Matt Sanders · in Torque Game Engine · 01/06/2005 (8:11 am) · 6 replies
I was wondering if there was a way in script to detect what bind map was the current or active binding map.... my problem I think is that the previous binds are still present when I push the new binds on the stack. I know that you can pop binds off the stack but I am not sure the syntax to do this and not shure how to detect what binds are on the stack in the first place... Any help is more then appreciated.
#2
01/06/2005 (7:16 pm)
I just don't want to have to pop every key bind that I have every time that I want to use another. In one game you may have key bind for 1. Driver, 2. passenger, 3. unmounted, 4. flying, etc. I know there has to be an efficient way to do this in script.
#3
01/11/2005 (8:35 am)
Have you tried calling pop() on the GlobalActionMap?
#4
01/12/2005 (7:05 am)
For now my fix was to just pop every thing every time in the script that I have a question about what may be active. I have not heard anything about the pop global map yet. If you have any technical information on how this is done that would be greatly appreciated. Also I would like to know how deep is the stack (how many action maps can you push to the stack and have control of at the same time). Thanks for your response.
#5
01/12/2005 (11:10 pm)
Check out ActiveActionMapSet, and do a dump() on GlobalActionMap?
#6
Please let me know if there is an easier or more efficient way to do this.
If I change Client\scripts\client.cs at around line 34
Then when I go to change maps do something like
Would this be a good way to accomplish what I want?
thanks in advance.
EDIT: I would really like to have a test that will find out what bind the client currently has so I can perform a switch rather then pop every map.
is this possible?
02/21/2005 (9:32 am)
Ok I think I have not yet tried this out but I was wondering if this may be a good idea to do so I am seeking advice. Basically I do not want multiple binds to be active at one time so I want to pop all of the binds everytime a bind is to be changed. this is what I am thinking of doing. Please let me know if there is an easier or more efficient way to do this.
If I change Client\scripts\client.cs at around line 34
//This function was originally added for me to change the player binds
//for vehicle controls
From:
function clientCmdPopActionMap(%map)
{
echo("Popping action map " @ %map);
%map.pop();
}
TO:
function clientCmdPopActionMap(%this)
{
echo("Popping all action maps");
moveMap.pop();
vehicleDriverMap.pop();
vehiclePassengerMap.pop();
}Then when I go to change maps do something like
CommandToClient(%client.client, 'PopActionMap'); CommandToClient(%client.client, 'PushActionMap', moveMap);
Would this be a good way to accomplish what I want?
thanks in advance.
EDIT: I would really like to have a test that will find out what bind the client currently has so I can perform a switch rather then pop every map.
is this possible?
Torque Owner Eric Lavigne