How do I type in a name with a gamepad?

Get help using Construct 2

Post » Sat Jul 04, 2015 11:41 am

Hey, guys!

I found a lot of tutorials of how you can type in your name for leader board entries with the keyboard.

...but since the game I am making is more of a "Sitting on the couch with a controller" type of game. I'd like to type my name, how you did it in Zelda, Final fantasy, Crono trigger etc:

Image


Trying to figure out how I will make this work without adding a billion events for every possible key-press on each location. I am not using a mouse at all for this project.

Any ideas?

Thanks in advance! c:
B
9
S
1
Posts: 16
Reputation: 563

Post » Sat Jul 04, 2015 1:03 pm

If it can help you, you could use sprites for letters, each letter being a different animation frame for the same sprite.

Then you move an overlay sprite by lets say 32 pixels (Letter sprite is 32 pixels too)
If OverlaySprite is positioned in A then it can move only if X is greater or equal than A.XPosition.

I did something similar for a menu with around 10 lines of code or a bit more so should hopefully be fairly easy.

Good luck!
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sat Jul 04, 2015 1:56 pm

No reason why you couldn't use a sprite font or text object is there ? Use a for loop to generate them on StartLayout, use the index to calculate X and Y positions. Or alternatively use the style used in early arcade games (why so many high score tables say AAA)
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328


Return to How do I....?

Who is online

Users browsing this forum: TsubaRu and 9 guests