Word Limit in Save Input Block

A cool thing I would like to see in Hopscotch is a word limit feature. Let’s say you have a box that you want players to type words in. But if the play types to much it would go over the box. So I would like to see a feature that lets you set a limit of words, like save input hello limit 10, that will only allow 10 characters to type max.

11 Likes

Yeah, this’d be cool!

7 Likes

Useful but unnecessary. You could just do this by doing

Save input (variable)
Check once if (length(variable) >= (put amount of characters you want to be the max))
7 Likes

but it wouldn’t make you stop at 10 characters, it would have to prompt you again which makes you use an ability to ensure it doesn’t happen forever

I like this idea

7 Likes

Yeah cool, but could be coded

6 Likes

Maybe Not For Me But a Block would be cool the save input block (Type Max Characters Here)

6 Likes

isn’t that the idea though?

6 Likes

Aren’t you describing the idea this topic is suggesting?

5 Likes

That works?

3 Likes

It can be coded?

4 Likes

Cool, but I don’t see how necessary this would be. Project titles already get cut off, so capping a title seems pointless in that sense. It could become annoying if your project title is a bit longer and it gets cut off because of a limit.

4 Likes

That’s why the replace block would be a good addition.

6 Likes

In save block, not project titles.

3 Likes

What do you mean by replace block?

3 Likes

Well, there is a controversy to this.

there are a few possibilities here that go.

Save Input (Whatever) prompt (What do you want! Use up to 10 characters)

That works as you can put it in the prompt

The other way:

Save Input (Whatever) prompt (What do you want)

 Check once if (Whatever) > 10
  Set (Whatever) characters at index (0) to (10)

That way is the more useful way, but if they don’t know, then it doesn’t work.

2 Likes

FOLLOW UP

You can also do this, as well

Save Input ( (Self) Whatever) prompt (What do you want?)
 
{
 Check Once if (Length ( (Self) Whatever)) > (10)
  Set ( (Self) Whatever) characters at index (0) to (10)
  Save Input ( (Self) Confirmation) prompt (Your input was changed. Do you want to save changes? Make sure to remember that you need to have a limit of 10 characters)
}

{
 Check Once if ( (Self) Confirmation) = ((((((y) and Y) and e) and E) and s) and S)
 Set Text to (Great!)
 Check Once if ( (Self) Confirmation) = ((n) and N) and o) and O)  
Save Input ( (Self) Whatever) prompt (What is your new input?)
}
{
 Check Once if  (Length ( (Self) Whatever) ) < (10)
 Set Text (Great Job!)
}

Continue with code

Confusing? I know. Correct me if I am wrong on anything.

1 Like

Bruh I messed up on the check prompt.

Instead of and, can someone make it to or?

@TheCMStudios

1 Like

It doesn’t go COMPLETELY as planned, so get prepared for troubleshooting

2 Likes
2 Likes

What do you mean, replace?

2 Likes