Author Topic: moveMap.bind not working?  (Read 2637 times)

Whenever I do this:

Code: [Select]
moveMap.bind(keyboard, "m", functionnamethatwillechosomthing);
It's as if it's not registering, and the bind won't trigger anything.

Are you in-game? Does the function itself work? Try using echo instead of a custom function.

Are you in-game? Does the function itself work? Try using echo instead of a custom function.

Well this is what's in the client.cs:

Code: [Select]
moveMap.bind(keyboard, "m", toggleIRC);

function toggleIRC() {
           echo("Pizza");
}

And when I go in game, it loads with no errors, but when I press M, it just doesn't print anything.  :panda:

Well this is what's in the client.cs:

Code: [Select]
moveMap.bind(keyboard, "m", toggleIRC);

function toggleIRC() {
           echo("Pizza");
}

And when I go in game, it loads with no errors, but when I press M, it just doesn't print anything.  :panda:
i believe that is because M is bound to use mouse.

i believe that is because M is bound to use mouse.

So which one would be bound to f3?

movemap only works if you're in a server


GlobalActionMap.bind(%device,%key,"functionHere"); //No (); or anything like that

GlobalActionMap.bind(%device,%key,"functionHere"); //No (); or anything like that

Thanks, it works now.  :cookieMonster:

Are you in-game? Does the function itself work? Try using echo instead of a custom function.
GlobalActionMap.bind(%device,%key,"functionHere"); //No (); or anything like that
Port quick, make something amazing because Visolator is going to replace you in coding help!!!!

Port quick, make something amazing because Visolator is going to replace you in coding help!!!!
Stop, please.

Port quick, make something amazing because Visolator is going to replace you in coding help!!!!

Not my fault that tetronaught can't tell the difference between having the game open and being spawned in a server ;)

Not my fault that tetronaught can't tell the difference between having the game open and being spawned in a server ;)

Not my fault that I found moveMap before ActionMap :)

No, but you could have done the research yourself. If you look at any clientside add-on that includes a GUI then check how it binds a key, you'd have never had to make a topic. It's okay that you did though, just don't give people stuff that are trying to help you.

Also, there are better ways to do this. You'd probably want to add an entry to the controls section in options.

$remapDivision[$remapCount]="IRC";
$remapName[$remapCount]="Toggle";
$remapCmd[$remapCount]="ToggleIRC";
$remapCount++;


You could probably pair this with GlobalActionMap.bind() to set a default value, but I've never actually tried that.

Excuse me this is coders only.

Anyways,  I needed it in a way where it's fixed and you don't have to bind it yourself.

Ps. You've replied to every post I've made today.
« Last Edit: February 10, 2014, 02:30:28 AM by tetronaught »