M
MJs nose
Guest
I created a little weapon script so that i could toss a nade, switch to the gravity gun to pick up the nade, and then throw them at people. I'm really good at doing it manually, but i wanted to be able to do it with one press of a key. Here's the script that i bound to a key.
The wait15 command is an alias consisting of 15 waits.
"+attack2; wait15; -attack2; wait15; slot1; +attack2"
What this does is when you have the nades out, it executes the secondary fire on the nade, waits 15 frames, deactivates the secondary fire, waits another 15 frames, switches to slot1(grav gun) and then executes the secondary fire on the grav gun. My problem is that i can't get it to deactivate the secondary fire on the grav gun. I've tried doing this...
"+attack2; wait15; -attack2; wait15; slot1; +attack2; wait15; -attack2"
which would logically deactivate the secondary fire on the grav gun, but it only drops the nade. Which is strange because it shouldn't. In order to hold an item with the grav gun, all you have to do is press the secondary fire once and it'll hold it. But for some reason, it is releasing it. I've come up with a temporary fix by binding "-attack2" to another key and then just pressing it after i've thrown the nade at somebody, but that becomes tiresome and slow. Makes quickly throwing two nades in a row at somebody almost impossible. Any suggestions?
Edit: oh, also... i've put my alias in the config.cfg file, but it doesn't seem to stay and i have to redefine the alias everytime i restart the game.
The wait15 command is an alias consisting of 15 waits.
"+attack2; wait15; -attack2; wait15; slot1; +attack2"
What this does is when you have the nades out, it executes the secondary fire on the nade, waits 15 frames, deactivates the secondary fire, waits another 15 frames, switches to slot1(grav gun) and then executes the secondary fire on the grav gun. My problem is that i can't get it to deactivate the secondary fire on the grav gun. I've tried doing this...
"+attack2; wait15; -attack2; wait15; slot1; +attack2; wait15; -attack2"
which would logically deactivate the secondary fire on the grav gun, but it only drops the nade. Which is strange because it shouldn't. In order to hold an item with the grav gun, all you have to do is press the secondary fire once and it'll hold it. But for some reason, it is releasing it. I've come up with a temporary fix by binding "-attack2" to another key and then just pressing it after i've thrown the nade at somebody, but that becomes tiresome and slow. Makes quickly throwing two nades in a row at somebody almost impossible. Any suggestions?
Edit: oh, also... i've put my alias in the config.cfg file, but it doesn't seem to stay and i have to redefine the alias everytime i restart the game.