The one key press is easy to fix but most users might not realize that.
Aside from the memory allocation (I have no knowledge on) sounds like a good test
subject what AmenMoses said.
having something like; g_OneKeyPressC
if g_OneKeyPressC = true then ---------- "You Caught the One and Only Easter Bunny!"
might be a useful global.lua function seeing as this is a common request.
It would allow for only one key press at a time similarly would be useful for g_Scancode.
I think it might be as simple as this (tell me if I missed something):
g_OneKeyPressC = g_KeyPressC
-- (engine watches for keypress)
g_OneKeyPressC = g_OneKeyPressC + g_KeyPressC
-----------------------------------------------------
-----alternatively to use true/false-----
----------------------------------------------------
if g_KeyPressC == 1 and g_OneKeyPressC == false then
g_OneKeyPressC = true
else
g_OneKeyPressC = false --(( does this code /setting it true here / contradict itself? ))
end
then you can (as above);
if g_OneKeyPressC == 1 then --- (alternatively = true)
Text(,,,," ---------- You Caught the One and Only Easter Bunny!")
else
Text(,,,," Missed! ---------- "The Easter Bunny is fast!")
end