06-21-2011, 05:47 AM
Call of Duty: World at War: [Release?] How to use A & B buttons in menu
Game: Call of Duty: World at War
Description
very simple script, but it does the job..
you could bind the buttons with the activeaction dvar, but A & B are kind of important buttons, you don't want to lose those..
so i wrote this to monitor the buttons
Code: MonitorB() { ori_stance = self GetStance(); for(;;) { new_stance = self GetStance(); if(new_stance != "stand") { self notify("Pressed_B"); self iPrintln("You Pressed B"); self SetStance("stand"); wait .3; } wait .05; } } MonitorA() { ori = self.origin; for(;;) { new_ori = self.origin; //self iPrintln(self.origin[2]); if((new_ori[2] - ori[2]) >= 10) { if((new_ori[2] - ori[2]) > 25) { self SetOrigin(ori); } self notify("Pressed_A"); self iPrintln("You jumped"); wait .3; } wait .05; } }
update for monitorA()
Code: MonitorOnGround() { for(;;) { if( !self IsOnGround()) { self notify("pressed_x"); self iPrintln("you jumped"); self thread BackOnGround(); self waittill("on_ground"); } wait .05; } } BackOnGround() { while(!self IsOnGround()) { wait .02; } self notify("on_ground"); self iPrintln("Landed"); }
Game: Call of Duty: World at War
Description
very simple script, but it does the job..
you could bind the buttons with the activeaction dvar, but A & B are kind of important buttons, you don't want to lose those..
so i wrote this to monitor the buttons
Code: MonitorB() { ori_stance = self GetStance(); for(;;) { new_stance = self GetStance(); if(new_stance != "stand") { self notify("Pressed_B"); self iPrintln("You Pressed B"); self SetStance("stand"); wait .3; } wait .05; } } MonitorA() { ori = self.origin; for(;;) { new_ori = self.origin; //self iPrintln(self.origin[2]); if((new_ori[2] - ori[2]) >= 10) { if((new_ori[2] - ori[2]) > 25) { self SetOrigin(ori); } self notify("Pressed_A"); self iPrintln("You jumped"); wait .3; } wait .05; } }
update for monitorA()
Code: MonitorOnGround() { for(;;) { if( !self IsOnGround()) { self notify("pressed_x"); self iPrintln("you jumped"); self thread BackOnGround(); self waittill("on_ground"); } wait .05; } } BackOnGround() { while(!self IsOnGround()) { wait .02; } self notify("on_ground"); self iPrintln("Landed"); }

