Darkstar2
 Joined: Jan 2014
Posts: 1,238
|
 |
Posted on: June 08, 2014, 04:21:03 AM |
|
|
|
Yet the other keyboard_lastchar, keyboard_lastkey etc work
Here is I want to do
switch (keyboard_key) { case vk_left: direction -=3; break; case vk_right: direction +=3; break; } speed=3; image_angle=direction;
Does nothing. When debugging, I found out keyboard_key returns 0. IS it broken?
|
|
|
|
|
Darkstar2
 Joined: Jan 2014
Posts: 1,238
|
 |
Reply #2 Posted on: June 08, 2014, 04:35:40 AM |
|
|
Quote from: time-killer-games on June 08, 2014, 04:32:05 AM
Quote from: Darkstar2 on June 08, 2014, 04:21:03 AM IS it broken?
No, it's not broken, it just doesn't work, that's all. Yes it' s broken. 
It was working before in previous spankings of ENIGMA I used it before. 
|
|
|
time-killer-games Guest
|
 |
Reply #3 Posted on: June 08, 2014, 05:05:58 AM |
|
|
Well then it should be an easy fix. 
|
|
|
|
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #6 Posted on: June 08, 2014, 03:53:12 PM |
|
|
|
You were probably thinking about keyboard_lastkey, but it was technically broke too.
|
|
|
Darkstar2
 Joined: Jan 2014
Posts: 1,238
|
 |
Reply #7 Posted on: June 08, 2014, 03:57:45 PM |
|
|
Quote from: Robert B Colton on June 08, 2014, 03:53:12 PM You were probably thinking about keyboard_lastkey, but it was technically broke too.
Last time I used keyboard_lastkey it returned a numeral indeed, but I used something once which returned vk_left, vk_right, etc.
|
|
|
TheExDeus
 Joined: Apr 2008
Posts: 1,860
|
 |
Reply #8 Posted on: June 08, 2014, 07:57:55 PM |
|
|
|
Those are also numeric constants. No function can return "vk_left", it can only return an integer that corresponds to vk_left.
|
|
|
|