[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4866: Undefined array key "database_gc"
Detecting when player is pressing w,a,s, or d. - FOSS gamedev and creative worlds

Detecting when player is pressing w,a,s, or d.

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Detecting when player is pressing w,a,s, or d.

by Neuromancer » Sat Sep 01, 2012 13:02

Is there a way to detect when the player is pressing w,a,s, or d. I'm not looking for up or down movement (space or e) I just want to detect when player is pressing w,a,s, or d in lua.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Sep 01, 2012 13:19

Neuromancer wrote:Is there a way to detect when the player is pressing w,a,s, or d. I'm not looking for up or down movement (space or e) I just want to detect when player is pressing w,a,s, or d in lua.

Nope, there isnt.
Last edited by PilzAdam on Sat Sep 01, 2012 13:20, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 01, 2012 13:29

PilzAdam wrote:Nope, there isnt.

Is there any way to tell if they are moving?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Sep 01, 2012 14:14

Neuromancer wrote:
PilzAdam wrote:Nope, there isnt.

Is there any way to tell if they are moving?

Save their position and check changes in a globalstep.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 19 guests

cron