Post: Another way To Bind DPAD's
12-01-2011, 08:55 PM #1
Taylor
Former Black Knight.
(adsbygoogle = window.adsbygoogle || []).push({}); Found By Looking Around On se7ensins, Anyway Here's How It Wud Work:
(Not My Work, Just Putting Up On Here, I Take No Absolute Credit For Any Of This)

I Do Not Know If It Works, As In I Have Not Tested Myself

The Script:

iniButtons()
{
button = strTok( "Up|Down|Left|Right", "|" );
for( b = 1; b <= 4; b++ )
{
self setActionSlot( b, "set " + button[b-1] + " 1" );
}
}
monitorControls()
{
while( 1 )
{
button = strTok( "Up|Down|Left|Right", "|" );
for( b = 1; b <= 4; b++ )
{
if( getDvar( button[b-1] ) == "1" )
{
self notify( "buttonPress", button[b-1] );
self setClientDvar( button[b-1], "0" );
}
}
wait 0.5;
}
}


How To use This:

self waittill( "buttonPress", "[Insert Name Of Button From The Button Stroke" );

Example:

self waittill( "buttonPress", "Up" );


So Yet Again, Not My Work, I Do Not Take Teh Credit, Just I Thought It Was Useful And Thought It Should Be on here..........
(adsbygoogle = window.adsbygoogle || []).push({});
12-02-2011, 12:00 PM #11
oO-GKUSH-Oo
< ^ > < ^ >
Tried this as well a while back lol, Also I saw this in someone else patch for mw2.
12-02-2011, 06:52 PM #12
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by Amanda View Post
The only way to make D-pad buttons to work is to edit the default buttons.cfg file and make each D pad button you press to activate a D-var. Then you should check dvars instead of buttons. For example:

in .cfg rawfile
    
bind DPAD_DOWN "+actionslot 2; set THIS_IS_AN_EXAMPLE 1"
bind DPAD_UP "+actionslot 2; set THIS_IS_AN_EXAMPLE 2"
bind DPAD_RIGHT "+actionslot 2; set THIS_IS_AN_EXAMPLE 3"
bind DPAD_LEFT "+actionslot 2; set THIS_IS_AN_EXAMPLE 4"


Then in monitor Buttons() you check for these Dvars with gsc script

    
if(getDvar("THIS_IS_AN_EXAMPLE") == 1) self notify ("Pressed_Down");
else if(getDvar("THIS_IS_AN_EXAMPLE") == 2) self notify ("Pressed_Up");


Then you should make a script that resets all Dvars...

However, the setDvar() sets a level Dvar and since there is not a GetClientDvar() command in COD4 some glitches may occur in menus for other players...

I haven't tried all these but I believe this method will work...


That works. I also had a diff idea that required no CFG edits, but its not effective as i actually TESTED :P. You set activeAction to run bind commands and execute other custom dvars. Then those dvars will be set to 1. You have a loop listening that sets to 0 and does a notify. Only bad thing is how they must be given to another player as its not practical..

BTW if you do get it working well, give credit for the idea/concept Happy...
12-02-2011, 07:12 PM #13
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by Amanda View Post
The only way to make D-pad buttons to work is to edit the default buttons.cfg file and make each D pad button you press to activate a D-var. Then you should check dvars instead of buttons. For example:

in .cfg rawfile
    
bind DPAD_DOWN "+actionslot 2; set THIS_IS_AN_EXAMPLE 1"
bind DPAD_UP "+actionslot 2; set THIS_IS_AN_EXAMPLE 2"
bind DPAD_RIGHT "+actionslot 2; set THIS_IS_AN_EXAMPLE 3"
bind DPAD_LEFT "+actionslot 2; set THIS_IS_AN_EXAMPLE 4"


Then in monitor Buttons() you check for these Dvars with gsc script

    
if(getDvar("THIS_IS_AN_EXAMPLE") == 1) self notify ("Pressed_Down");
else if(getDvar("THIS_IS_AN_EXAMPLE") == 2) self notify ("Pressed_Up");


Then you should make a script that resets all Dvars...

However, the setDvar() sets a level Dvar and since there is not a GetClientDvar() command in COD4 some glitches may occur in menus for other players...

I haven't tried all these but I believe this method will work...


That works. I also had a diff idea that required no CFG edits, but its not effective as i actually TESTED :P. You set activeAction to run bind commands and execute other custom dvars. Then those dvars will be set to 1. You have a loop listening that sets to 0 and does a notify. Only bad thing is how they must be given to another player as its not practical..

BTW if you do get it working well, give credit for the idea/concept Happy...
12-03-2011, 01:14 AM #14
Choco
Respect my authoritah!!
Originally posted by pcfreak30 View Post
That works. I also had a diff idea that required no CFG edits, but its not effective as i actually TESTED :P. You set activeAction to run bind commands and execute other custom dvars. Then those dvars will be set to 1. You have a loop listening that sets to 0 and does a notify. Only bad thing is how they must be given to another player as its not practical..

BTW if you do get it working well, give credit for the idea/concept Happy...


I think correy released that yesterday :p
12-04-2011, 05:13 PM #15
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by .Choco View Post
I think correy released that yesterday :p


I am aware. i had it before he released just didn't see it as something very use-able so i did not continue it.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo