Control Settings: "while pressed"

Request help for teeworlds-related subjects (mapping, servers, ..).
For client issues, see our repositories (https://github.com/ddnet/ddnet/issues).
Post Reply
User avatar
Infinity
Posts: 11
Joined: Sun Oct 11, 2015 1:10 pm
Clan: ƞuts

Control Settings: "while pressed"

Post 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
fokkonaut
Posts: 855
Joined: Wed May 13, 2015 5:59 pm
Player profile: https://ddnet.tw/players/fokkonaut

Re: Control Settings: "while pressed"

Post 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.
User avatar
BannZay
Posts: 837
Joined: Mon May 04, 2015 12:26 am
Location: Ukraine
Player profile: http://ddnet.tw/players/BannZay
Mapper profile: http://ddnet.tw/mappers/BannZay/

Re: Control Settings: "while pressed"

Post 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
n000b
Posts: 164
Joined: Tue Oct 28, 2014 4:18 pm
Clan: |AFK|

Re: Control Settings: "while pressed"

Post 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.
User avatar
timakro
Posts: 414
Joined: Mon May 05, 2014 6:05 pm
Location: Germany
Player profile: http://ddnet.tw/players/timakro/
Mapper profile: http://ddnet.tw/mappers/timakro/
Clan: unique

Re: Control Settings: "while pressed"

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests