TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Get Control Text?
Pages:
1
Get Control Text?
SnakeKiller
Posts: 29
July 28, 2017, 04:19:30 am
Is it possible to get or print the value of the control key assigned to the control name? Or is that too weird of a thing?
What I'm trying to do is create a user-friendly menu option where players can change the control keys.
JeffreyDriver
Posts: 2262
July 28, 2017, 05:11:46 am
This thread touches on something slightly similar to capture key presses-
http://community.stencyl.com/index.php/topic,51961.0.html
You can record the key presses into attributes then use the 'simulate key press' block.
Current Projects:
The Grand Grimoire Chronicles Episode 3
Twitter@JeffreyDriver
apps.jeffreydriver.co.uk
SnakeKiller
Posts: 29
July 28, 2017, 05:47:37 am
Thanks, I've seen and read those. I understand the Input events, but I want to do something different. On a created event, I want to get the character values as text so I can save/load the information, and display the keys on the menu screen from the start without having the player press any keys yet.
JeffreyDriver
Posts: 2262
July 28, 2017, 07:03:56 am
See the basic code attached. It records the input to a list so that they can be recalled later, it also draws it to screen.
Use don't need to use a 'when created' block.
Global attributes (the purple blocks) can easily be referred to from within different scenes.
If you want to assign multiple keys, you need a way of keeping track which control the current key press is for. I'd do this by having a button on screen for each control input you need and use an attribute to keep track of the last clicked button, then when a key is pressed record it to the right location in a list
Current Projects:
The Grand Grimoire Chronicles Episode 3
Twitter@JeffreyDriver
apps.jeffreydriver.co.uk
LIBERADO
Posts: 2720
July 28, 2017, 07:41:36 am
Take a look at the great
Custom Controls Extension
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.
SnakeKiller
Posts: 29
July 29, 2017, 09:15:48 pm
Thanks guys for the response. Sorry for my late response; it's been a very busy week for me. I'll take a look at what both of you shared. Thanks again!
Pages:
1