Naming your character

0 favourites
  • 6 posts
From the Asset Store
2d mushroom sprite 2d game mushroom character enmy sprite game art
  • Hey, so I've been working on naming my character at the file select screen,and I've got most of the things working, but I've hit a few snags. I can't figure out how to simulate a backspace, and I also need to be able to limit the length of the name to 6 characters (so that it can't be sticking out of textboxes).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmm... not the easiest thing to fix, then? In that case, at least it wasn't just me.

  • on backspace pressed

    set playername to left(playername,len(playername)-1)

    (not tested)

  • and re length

    if len(playername)>6 .. set playername to left(playername,6)

    (not tested)

    Your capx certainly looks interesting . I can not see in your capx where you are pressing backspace.

  • Unfortunately I'm stuck in the file selection screen.

    First of all you really should think about your project structure.

    You have about 100 Events just to select a letter. You could change that by giving the letters instance variables. Or why don't you already just position them in the construct layer? (and use different layers).

    To avoid huge events like event Number 192 you may also add another instance variable to see in which row the letters are.

    I assume you want to reduce the text string by one letter, when the user hits the button backspace. Try to use RamPackWobbles Function.

    Whenever the user hits a letter check this.

    Compare two values len(Text.text) > 6 ... error or something else.

    RamPackWobble: He uses a Sprite that's called backspace.

  • Okay, thanks guys, I'll test those things out as soon as I get a chance!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)