Topic: Press and hold a button for dynamic cam?
The use of dynamic and static cam can be made more dynamic with pressing and hold a button, (eg. lshift for emotion).
You are not logged in. Please login or register.
Teeworlds Forum → Development → Press and hold a button for dynamic cam?
The use of dynamic and static cam can be made more dynamic with pressing and hold a button, (eg. lshift for emotion).
Did it, wanna see?
Did it, wanna see?
Great, definitely
Its also possible with ddnetclient. Just bind +toggle <configname> <value to change to> <standard value>.
ddnet.tw
edit:
+toggle would be pretty useful for standard client too btw.
+toggle would be pretty useful for standard client too btw.
toggle and +toggle will be in 0.7 (see #888)
So there is no need of a special command for dynamic camera . But then a tutorial would be badly needed.
You can also pretty much achieve the same goal in vanilla client with some config abuse. See this old post of mine.
The use of dynamic and static cam can be made more dynamic with pressing and hold a button, (eg. lshift for emotion).
bind lshift "+toggle cl_mouse_followactor 60 0;cl_mouse_max_distance 800 400"
Use DDNet Client for this bind or some other Client that supports a dynamic camera bind.
My solution looks something like this:
controls.h
int m_InputDynamicCamera;
controls.cpp:
Console()->Register("+dynamiccamera", "", CFGFLAG_CLIENT, ConKeyInputState, &m_InputDynamicCamera, "Dynamic camera");
if (m_InputDynamicCamera)
{
g_Config.m_ClMouseFollowfactor = 60;
g_Config.m_ClMouseMaxDistance = 1000;
g_Config.m_ClMouseDeadzone = 300;
}
else
{
g_Config.m_ClMouseFollowfactor = 0;
g_Config.m_ClMouseMaxDistance = 400;
g_Config.m_ClMouseDeadzone = 0;
}
binds.cpp
Bind(KEY_LCTRL, "+dynamiccamera");
Requires resetting controls once so left control gets binded. Correct lines to modify should be easy to spot.
Maybe not the easiest solution, but it is still a working dyn-bind.
I created two configuration files, dynon.cfg and dynoff.cfg.
Say your key to bind is x.
dynon.cfg
cl_mouse_deadzone 300
cl_mouse_followfactor 60
cl_mouse_max_distance 1000
bind x "exec dynoff.cfg"
dynoff.cfg
cl_mouse_deadzone 0
cl_mouse_followfactor 0
cl_mouse_max_distance 400
bind x "exec dynon.cfg"
You may also want to insert inp_mousesens 394893485934545 for playing with 2 different senses..
Then you just have to add in your settings.cfg:
bind x "exec dynon.cfg"
lush, you post is entirely wrong.
Guess you didnt read his post carefully enoght
lush, you post is entirely wrong.
Guess you didnt read his post carefully enoght
Oh yes sry.
I really should read more carefully
Teeworlds Forum → Development → Press and hold a button for dynamic cam?
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.