Get Key Pressed
Moderator: Core Staff
Get Key Pressed
Is there a function of some sort which can read in what button a player has pressed?
Mainly looking just for W,A,S,D . I know use and melee is possible, but those are functions for themselves.
Mainly looking just for W,A,S,D . I know use and melee is possible, but those are functions for themselves.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Get Key Pressed
Wow now is my chance to help NM
Here you go...
Here is levs code:
Obviously UserButtonPressed(); is a function, so there is probably one for +forward because the cod makers use that function for the killcam you know when you push F to skip killcam...
There is probably one for walk and such or you can probably make your own using
+forward
+backwards
+moveleft
+moveright
Those are what your WASD keys are bound to...
Here you go...
Here is levs code:
Code: Select all
_UseKey()
{
self endon("end_saveposition_threads");
for(;;)
{
if(self useButtonPressed())
{
catch_next = false;
for(i=0; i<=0.30; i+=0.01)
{
if(catch_next && self useButtonPressed())
{
self thread checksave();
wait 1;
break;
}
else if(!(self useButtonPressed()))
catch_next = true;
wait 0.01;
}
}
wait 0.05;
}
}
There is probably one for walk and such or you can probably make your own using
+forward
+backwards
+moveleft
+moveright
Those are what your WASD keys are bound to...
"I am also know as lethal323" - Myself
Xfire = Dizzymagoo
Re: Get Key Pressed
Well Dizzy, that doesn't really help at all since I said I already knew about the use and melee.
I'll try the function KS gave in a bit.
I'll try the function KS gave in a bit.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Re: Get Key Pressed
Ok KS, that didn't work, says it was an unknown function, so I am guessing that is only going to work in CoD4.
Anyone have any other ideas?
Anyone have any other ideas?
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Get Key Pressed
No, you cannot detect key press other than Use, Melee and Attack.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Get Key Pressed
Detect Keypress has obvious flaws and would allow the creation of a pointless keylogger, most things can be detected in other ways.KillerSam wrote:It would seem an obvious thing to add - /moans
Scripts have been made to detect leaning, you can detect mantle and climbing now, you can detect whena grenade is thrown, stance, aim-down-sight...
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Get Key Pressed
PM coming your way drof.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
Who is online
Users browsing this forum: No registered users and 1 guest