Scripts / Any way to detect non-E key pressing?

Author
Message
Alexander Pozharskii
9
Years of Service
User Offline
Joined: 5th Oct 2014
Location:
Posted: 7th Feb 2015 04:18
Does I have any way to detect non-E key pressing (e.g. "I" to prompt collected items (by my script) list)?
exadion
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 1st Nov 2014
Location:
Posted: 7th Feb 2015 17:45
look for omegacore here in the forums, it allows detecting most keys.

My blog site, free artwork, scripts, textures etc.

http://jadenstockartwork.blogspot.com/
PM
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 7th Feb 2015 17:50
Hi Alexander

At the present time the only key that you can monitor through Reloaded is the "E" key. That should be changed in the future.

That said there is an extension to LUA called Omega Core which allows LUA to pick-up other key strokes that can be used in a LUA script. However, two things to keep in mind here...
1) There are already keys that Reloaded uses internally... Space key to jump, "C" key to crouch, and others. If you use Omega Core you'll need to make sure that you do not interfere with these built in functions.
2) Also, in the future Reloaded will use other keys and that might bother your coding. What happens if you use the key "Q" for something and later on Reloaded uses that key for something else?

This is the problem in working through a Beta development cycle. The only thing that's constant is change, so if you spend a lot of time coding you may find down the road a major rework job on your code (not fun)

I do not have the location of Omega Core handy, but you can search the forum, or Google to find it.

Good Luck

"There is no spoon"
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 8th Feb 2015 09:58 Edited at: 18th Feb 2015 21:34
Go to https://forum.game-guru.com/thread/210666

Read all posts there and find how you can use the omegacore.
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fpsarea/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 9th Feb 2015 20:58
I'm surprised it hasn't been improved yet. I have requested better input support for ages. I'm sure many others must have also. Ultimately, we want users to be able to configure their controls as they wish. So we need to be able to check for any keypress and also a way to check certain inputs, regardless of whatever key is defined to it. So if the user changed the e key to another key, it would still work for actions in this case. All the present scripts available would have to be changed I imagine if something like this were adopted.

I think definable keys are a must for any game really. I often do use default settings for most myself, but others don't and of course sometimes I will change the odd thing now and again. So lets hope that Reloaded gets a lot more love in this area sooner rather than later.



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 9th Feb 2015 21:35
An pre-build options menu would be nice. There you can set the keys you wants to use, amoung others things.
Engine could read your settings before load game, and scripts should change this part of code, instead of type if g_KeyPressE == 1, you could type something like,IE:



3com

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-05-08 04:23:13
Your offset time is: 2024-05-08 04:23:13