Forum

> > CS2D > Scripts > All Key for Lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English All Key for Lua

15 replies
To the start Previous 1 Next To the start

old All Key for Lua

X-Files
User Off Offline

Quote
İ thinked ,maybe on next cs2d uptade we can use all key for lua.

ex;

1
2
3
4
addhook("menu","ex")
function ex(id,title,buton)
if title=="exmp" then
if buton==k then

k,l,m,n,o,p,z,x,r,t,y

i think its ll good

old Re: All Key for Lua

Trali
User Off Offline

Quote
why do you want it but good ideas
edited 2×, last 03.09.11 06:33:28 pm

old Re: All Key for Lua

Apache uwu
User Off Offline

Quote
user X-Files has written
İ thinked ,maybe on next cs2d uptade we can use all key for lua.

ex;

1
2
3
4
addhook("menu","ex")
function ex(id,title,buton)
if title=="exmp" then
if buton==k then

k,l,m,n,o,p,z,x,r,t,y

i think its ll good


I think there are enough topics on new ideas. I think that is a very bad idea. CS2D is not a keylogger.

old Re: All Key for Lua

X-Files
User Off Offline

Quote
user Apache uwu has written
user X-Files has written
İ thinked ,maybe on next cs2d uptade we can use all key for lua.

ex;

1
2
3
4
addhook("menu","ex")
function ex(id,title,buton)
if title=="exmp" then
if buton==k then

k,l,m,n,o,p,z,x,r,t,y

i think its ll good


I think there are enough topics on new ideas. I think that is a very bad idea. CS2D is not a keylogger.

İ think u must never thinking.
Who talking about key logger.

old Re: All Key for Lua

Apache uwu
User Off Offline

Quote
Yeah every key stroke is a very bad idea. I think a lot of people would agree and for well known reasons.

old Re: All Key for Lua

EngiN33R
Moderator Off Offline

Quote
Erm... I wouldn't. I proposed that suggestion in the 0.1.2.0 suggestion thread, and while I agree that maybe not the whole keyboard should be implemented - at least the main zone (a-z, 1-0, -, = ) and maybe like Ctrl should. However I agree that would increase the traffic usage, but meh.

old Re: All Key for Lua

X-Files
User Off Offline

Quote
user EngiN33R has written
Erm... I wouldn't. I proposed that suggestion in the 0.1.2.0 suggestion thread, and while I agree that maybe not the whole keyboard should be implemented - at least the main zone (a-z, 1-0, -, = ) and maybe like Ctrl should. However I agree that would increase the traffic usage, but meh.


this must be done if dc do then cs2d is more fun and we can make funny luas
but u right may not all keys but z-x-c-1-2-3-4-5-ctrl-...

old Re: All Key for Lua

Banaan
User Off Offline

Quote
How about my binds, how about talking (z), buying equipment(c), how about weapon selection (12345) how about my bind on ctrl? I think players need most of the keys on the client side.

old Re: All Key for Lua

Apache uwu
User Off Offline

Quote
user EngiN33R has written
Erm... I wouldn't. I proposed that suggestion in the 0.1.2.0 suggestion thread, and while I agree that maybe not the whole keyboard should be implemented - at least the main zone (a-z, 1-0, -, = ) and maybe like Ctrl should. However I agree that would increase the traffic usage, but meh.


It would increase. Mouse pointer location are requested. So you can just stop requesting any time you want.

However keystrokes will be sent every time the client presses a key. So yeah it would totally bomb the server if people start typing. Also I don't see the need for every key stroke.

@Banaan, you can capture slot keys with select(id,type,...)

I'd rather it not do anything when I press a button. Since I have leftctrl for he attack, alt for flash, shift for smoke, v for walk, and a lot of other binds that might be sent when I try to use my binds.

old Re: All Key for Lua

X-Files
User Off Offline

Quote
user Banaan has written
How about my binds, how about talking (z), buying equipment(c), how about weapon selection (12345) how about my bind on ctrl? I think players need most of the keys on the client side.


then lets change that only unused keys or whatever WE NEED İT for better creatif luas

old Re: All Key for Lua

Apache uwu
User Off Offline

Quote
user X-Files has written
user Banaan has written
How about my binds, how about talking (z), buying equipment(c), how about weapon selection (12345) how about my bind on ctrl? I think players need most of the keys on the client side.


then lets change that only unused keys or whatever WE NEED İT for better creatif luas


Yeah more function keys are fine. What are you trying to make?

old Re: All Key for Lua

X-Files
User Off Offline

Quote
user Apache uwu has written
user X-Files has written
user Banaan has written
How about my binds, how about talking (z), buying equipment(c), how about weapon selection (12345) how about my bind on ctrl? I think players need most of the keys on the client side.


then lets change that only unused keys or whatever WE NEED İT for better creatif luas


Yeah more function keys are fine. What are you trying to make?


dont worry not hack

old Re: All Key for Lua

EngiN33R
Moderator Off Offline

Quote
What I would however verily like to see is at least detection whether the user went up/down/left/right, a (in my mind) good example is car racing scripts, for example with those hooks you can do so that if the player presses W they don't go straight up but go in the direction they look with acceleration and friction.

old Re: All Key for Lua

X-Files
User Off Offline

Quote
user EngiN33R has written
What I would however verily like to see is at least detection whether the user went up/down/left/right, a (in my mind) good example is car racing scripts, for example with those hooks you can do so that if the player presses W they don't go straight up but go in the direction they look with acceleration and friction.



Yea like that ,we can make too much tings and easy playable can be possible

old Re: All Key for Lua

Lee
Moderator Off Offline

Quote
user EngiN33R has written
What I would however verily like to see is at least detection whether the user went up/down/left/right, a (in my mind) good example is car racing scripts, for example with those hooks you can do so that if the player presses W they don't go straight up but go in the direction they look with acceleration and friction.


Overriding the w key in this case is a bad practice, especially when you really only want to override the move-forward command. Set up a table that keep track of the player position within the last n moves to approximate direction of movement and other intrinsics such as velocity and acceleration.

Even if you are given full control of the w key, you would still need to do this in order to calculate the properties of the players.

old Re: All Key for Lua

EngiN33R
Moderator Off Offline

Quote
No one said anything about overriding the move-forward function, anything you parse there will be executed in addition to the move-forward function. In case of my example you could just set the speedmod of the player to -100 and just setpos the player forward. You get what I mean hopefully. Oh, and it is possible to detect movement how you've described, but such hook would ease the sequence a lot.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview