Post: Working Dpad Menu Control Method
07-08-2011, 04:11 PM #1
Hawkin
Lord of the Undead
(adsbygoogle = window.adsbygoogle || []).push({}); I was looking for a way to use the dpad in my next patch. Spent a half a day searching. This definitely will work. It may be a little slower, then using the easy buttons.
This is not my code it is Dudeeitsbrian. It took me awhile to find this. I thought posting it here, might save some of you alot of time. It won't be useful for the game mode I am working on but it would be useful in a challenge lobby patch, or any for any menu.

For Multiplayer.
    startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","satchel_charge_mp" );
self SetActionSlot( 2, "weapon", "mine_bouncing_betty_mp" );
self SetActionSlot( 3, "weapon","bazooka_mp" );
self SetActionSlot( 4, "weapon","m2_flamethrower_mp" );
self giveweapon("m2_flamethrower_mp");
self giveweapon("mine_bouncing_betty_mp");
self giveweapon("satchel_charge_mp");
self giveweapon("bazooka_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="bazooka_mp"){
self notify("Left");
self TakeWeapon( "bazooka_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("bazooka_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="m2_flamethrower_mp"){
self notify("Right");
self TakeWeapon( "m2_flamethrower_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("m2_flamethrower_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="satchel_charge_mp"){
self notify("Up");
self TakeWeapon( "satchel_charge_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("satchel_charge_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="mine_bouncing_betty_mp"){
self notify("Down");
self TakeWeapon( "mine_bouncing_betty_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("mine_bouncing_betty_mp");
wait 0.2;
}
wait 0.05;
}
}


FOR ZOMBIES
    startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","colt_dirty_harry" );
self SetActionSlot( 2, "weapon", "defaultweapon" );
self SetActionSlot( 3, "weapon","walther" );
self SetActionSlot( 4, "weapon","zombie_melee" );
self giveweapon("colt_dirty_harry");
self giveweapon("defaultweapon");
self giveweapon("walther");
self giveweapon("zombie_melee");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="walther"){
self notify("Left");
self TakeWeapon( "walther");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("walther");
wait 0.2;
}else if(self getCurrentWeapon()=="zombie_melee"){
self notify("Right");
self TakeWeapon( "zombie_melee");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("zombie_melee");
wait 0.2;
}else if(self getCurrentWeapon()=="colt_dirty_harry"){
self notify("Up");
self TakeWeapon( "colt_dirty_harry");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("colt_dirty_harry");
wait 0.2;
}else if(self getCurrentWeapon()=="defaultweapon"){
self notify("Down");
self TakeWeapon( "defaultweapon");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("defaultweapon");
wait 0.2;
}
wait 0.05;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to Hawkin for this useful post:

drive4567, hydro_122499, iReset Nigga, YouRecognizeMe
07-08-2011, 04:14 PM #2
iReset Nigga
2Fresshh!!
good job hawkin i no alot of people will love to use this Cool Man (aka Tustin) i wish i could get rid of this error so i can play w@w pc and start testing my patches
07-08-2011, 11:08 PM #3
.Kane.
Banned
Originally posted by Hawkin View Post
I was looking for a way to use the dpad in my next patch. Spent a half a day searching. This definitely will work. It may be a little slower, then using the easy buttons.
This is not my code it is Dudeeitsbrian. It took me awhile to find this. I thought posting it here, might save some of you alot of time. It won't be useful for the game mode I am working on but it would be useful in a challenge lobby patch, or any for any menu.

For Multiplayer.
    startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","satchel_charge_mp" );
self SetActionSlot( 2, "weapon", "mine_bouncing_betty_mp" );
self SetActionSlot( 3, "weapon","bazooka_mp" );
self SetActionSlot( 4, "weapon","m2_flamethrower_mp" );
self giveweapon("m2_flamethrower_mp");
self giveweapon("mine_bouncing_betty_mp");
self giveweapon("satchel_charge_mp");
self giveweapon("bazooka_mp");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="bazooka_mp"){
self notify("Left");
self TakeWeapon( "bazooka_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("bazooka_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="m2_flamethrower_mp"){
self notify("Right");
self TakeWeapon( "m2_flamethrower_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("m2_flamethrower_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="satchel_charge_mp"){
self notify("Up");
self TakeWeapon( "satchel_charge_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("satchel_charge_mp");
wait 0.2;
}else if(self getCurrentWeapon()=="mine_bouncing_betty_mp"){
self notify("Down");
self TakeWeapon( "mine_bouncing_betty_mp");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("mine_bouncing_betty_mp");
wait 0.2;
}
wait 0.05;
}
}


FOR ZOMBIES
    startDpad()
{
self.curweap = self GetCurrentWeapon();
self SetActionSlot( 1, "weapon","colt_dirty_harry" );
self SetActionSlot( 2, "weapon", "defaultweapon" );
self SetActionSlot( 3, "weapon","walther" );
self SetActionSlot( 4, "weapon","zombie_melee" );
self giveweapon("colt_dirty_harry");
self giveweapon("defaultweapon");
self giveweapon("walther");
self giveweapon("zombie_melee");
self thread monitorDpad();
}

monitorDpad(){
self endon ( "disconnect" );
self endon ( "death" );
wait 1;
for(;Winky Winky{
self waittill("weapon_change");
if(self getCurrentWeapon()=="walther"){
self notify("Left");
self TakeWeapon( "walther");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("walther");
wait 0.2;
}else if(self getCurrentWeapon()=="zombie_melee"){
self notify("Right");
self TakeWeapon( "zombie_melee");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("zombie_melee");
wait 0.2;
}else if(self getCurrentWeapon()=="colt_dirty_harry"){
self notify("Up");
self TakeWeapon( "colt_dirty_harry");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("colt_dirty_harry");
wait 0.2;
}else if(self getCurrentWeapon()=="defaultweapon"){
self notify("Down");
self TakeWeapon( "defaultweapon");
wait 0.1;
self switchToWeapon( self.curweap );
self giveweapon("defaultweapon");
wait 0.2;
}
wait 0.05;
}
}


Already knew this. Don't really like this way.
07-08-2011, 11:17 PM #4
little_legz
SleepinIsCheatin
I saw this in one of the GSC's a while back because I was going to make a menu but then gave in to modding. Wasn't too sure on how to actually get it to be able to be used in a menu haha. Anyhow nice find for the guys that didn't know about it! Smile
07-09-2011, 04:38 PM #5
Hawkin
Lord of the Undead
Originally posted by .Kane. View Post
Already knew this. Don't really like this way.


Is it too slow?
It's not useful to me, because I'm need people to be able to use them on the fly, for my game but I thought it would be helpful to CL patch makers.
07-10-2011, 09:31 PM #6
Originally posted by Hawkin View Post
Is it too slow?
It's not useful to me, because I'm need people to be able to use them on the fly, for my game but I thought it would be helpful to CL patch makers.


So is your new gamemode gonna be zombieland? Yes I think that would be awesome!
07-13-2011, 02:14 PM #7
Hawkin
Lord of the Undead
Originally posted by lovebros View Post
So is your new gamemode gonna be zombieland? Yes I think that would be awesome!


No not Zombieland the key word is "NEW"
07-14-2011, 07:14 PM #8
MNI_Mr_Mods
I am error
nice ill tell ,my friend about

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo