Page 1 of 1

Control Settings: "while pressed"

Posted: Sat Jul 02, 2016 6:00 pm
by Infinity
Hey guys,

this has been bothering me for some time now and I always wanted to figure out the best way to switch between hammer and other weapons. I then came up with the idea to only switch to hammer when e.g. shift is pressed.

to make it a little more clear:
While shift isn't pressed, I can switch weapons freely with mousewheel(or numbers). When I press shift, I switch to hammer and stay with that weapon. When I release shift, the weapon switches back to the last weapon(or something more static).

Does anyone know how to realize this in a relatively simple way? Or do you have a completely different approach to your controls?

Some help would be really appreciated, thanks!

~ Infinity

Re: Control Settings: "while pressed"

Posted: Sat Aug 20, 2016 9:45 pm
by fokkonaut
I think something like the "Hook collision" is needed. because if you hold the key you bound hook col its on. if u rls it its off. maybe tomorrow i can give a answer for the how-to. i need to test a bit and maybe ill get it.

Re: Control Settings: "while pressed"

Posted: Sat Aug 20, 2016 10:10 pm
by BannZay
If toggle(or whatever how it will be called) will works as toggle comand1 comand2 this and a lot of such stuffs will be possible.
Let me know pls if any client already contain this

P.s.: or at least console will contain current_weapon variable

Re: Control Settings: "while pressed"

Posted: Sun Aug 21, 2016 3:52 pm
by n000b
you can write a code in a cfg file and then exec it in ddnet. It should be possible to write it like what you want i guess.

Re: Control Settings: "while pressed"

Posted: Sun Aug 21, 2016 8:25 pm
by timakro
A bind system can't know what weapons you currently have picked up. If you would be okay with telling the bind system every time you loose your weapons or pick up a weapon by pressing keys (e.g. the number keys for picking up weapons and the delete key for loosing your weapons) this would be possible.