• How do I edit autoexec.cfg to turn physgun button into a toggle?
    3 replies, posted
I find the chord-click required to move a ragdoll limb, then fix it in place, to be very non-ergonomic. I want q,e,c,mouse1 and mouse2 to be toggles, rather than buttons that must be held. Editing C:\Games\Steam\steamapps\m_nadal\garrysmod\garrysmod\cfg\autoexec.cfg, I tried the following: [code] // toggle menu unbind q alias menu_off "-menu;bind q menu_on" alias menu_on "+menu;bind q menu_off" bind q menu_on // toggle context menu unbind c alias context_menu_off "-menu_context;bind c context_menu_on" alias context_menu_on "+menu_context;bind c context_menu_off" bind c context_menu_on // toggle physgun unbind mouse1 alias let_go "slot1;-attack;bind mouse1 pick_up" alias pick_up "slot1;+attack;bind mouse1 let_go" bind mouse1 pick_up // toggle hold unbind mouse2 bind mouse2 "slot1;+attack2;-attack" [/code] There's just a small problem with the above; It doesn't work. Q and C work fine, and mouse1 works as expected at first; Once I press mouse2 and fix the limb in place, however, mouse1 stops doing anything. I even tried 'bind mouse1 +attack', but that doesn't bring it back either. What am I doing wrong? I noticed a few people wanted toggle functions for the next release, I figured this should be possible with scripting. Any help or advice you could give me would be greatly appreciated.
IIRC, you can't do +attack and +attack2 at the same time. Try firing the SMG and launching a grenade at the same time. Try adding a -attack2 command to the Mouse1 bit of the CFG. Also 5000th post yay
[QUOTE=CoolCorky;21587932]IIRC, you can't do +attack and +attack2 at the same time. Try firing the SMG and launching a grenade at the same time. [/QUOTE] Pretty sure you can. Just not with the SMG. Edit: Holy shit you have 11 posts per day Edit2: I think I used to have something like that too
I found a satisfactory solution: [code] // toggle physgun unbind mouse1 alias let_go "slot1;-attack2;-attack;bind mouse1 pick_up" alias pick_up "slot1;-attack2;+attack;bind mouse1 let_go" bind mouse1 pick_up // fix and release unbind mouse2 alias fix_and_release "+attack2;-attack" bind mouse2 fix_and_release [/code] Somebody could probably improve on this. Maybe we should start a poll on wether people use gmod with the defaults, and if not, what changes do they make?
Sorry, you need to Log In to post a reply to this thread.