Scripts / Is there any way to have a script request an input from player?

Author
Message
BarZaTTacKS
10
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 24th Feb 2014 19:50
What I mean to request is it possible to script a lua code that will prompt the player to input numbers (to match a code) or letters (to match a word) in order for an action to start or to be completed.



A small example would be to type a password to open a door instead of just key based.



Thanks in advance!!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Feb 2014 00:28
not yet, in (the near) future yes definitely

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 7th May 2014 01:44
I haven't actually tried this myself, but I think it might be possible. I was thinking of this myself. I know you can check a key press like the E key, but not sure if other keystrokes are recognized. If they are then you could accumulate each keystroke by storing them in a global array and when all of them are entered correctly in sequence then perform the action. Again, though, we would need keystroke recognition other than the E key and I don't know if that's possible yet.
almightyhood
11
Years of Service
User Offline
Joined: 9th Oct 2013
Location:
Posted: 7th May 2014 04:00
well currently, I think only E F R C shift are used for the most part the rest are waiting to be added I thought?.

evga GeForce gtx 750 ti boost2.0 2gb gddr5. win 8.1 quad core 4gb ram.
PM
tomjscott
User Banned
Posted: 7th May 2014 06:16
Quote: "well currently, I think only E F R C shift are used for the most part the rest are waiting to be added I thought?."




I'm only just starting to learn scripts so I didn't know. I guess it's not quite possible then at this point.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 7th May 2014 19:38
Quote: "well currently, I think only E F R C shift are used for the most part the rest are waiting to be added I thought?."


think you may have missed WASD there?



you can use my method of obtaining a passcode using entites though (some commercial games simply have the code on pieces of paper etc rather than require direct input and then once you collect the full code it'll let you pass)

you could use a similar system, maybe just have the player collect 3 or so security cards before he can pass.



http://fpscrforum.thegamecreators.com/?m=forum_view&t=207801&b=2&msg=2479693#m2479693

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 7th May 2014 19:40
Great idea smallg. I'm doing some similar things in my game as well. Even with what little scripting we already have, there are some really interesting things we can do gameplay-wise with just a little ingenuity.
BarZaTTacKS
10
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 12th May 2014 15:07
If this is scripted I would think it would be best to have an enable button first, so that when that is pressed it disables other short cuts so you have access to the whole keyboard when typing inputs.
PM

Login to post a reply

Server time is: 2024-12-22 01:27:33
Your offset time is: 2024-12-22 01:27:33