Code event

How do I use input numbers and set a certain number that if its right they get like a special item
Use the event command to let the player input a number (the number will be saved into a variable)

then use the conditional branch to check the value of the variable

This is a somehow easy thing to do if you have took time to even play around with the events or look at the beginner tutorials here...
How do i use input code so that i make a certain number and if entered right you get a certain item or something like this

code.png
Seriously, don't create two threads for just one question... There's an edit button in case you forgot to add anything too...

also, you might wanna just use input name in case you want letters and numbers...

Just make an extra actor, then use the change name command to let the player input the code... then set a variable to be equal to the name of that actor and check that variable's value...
i just want numbers like the picture and i have no idea how to do it

also in my game the player has a choice to be any of the actors
I already told you how to in the "old" thread
i did what you said in the "old" thread but i dont know how do know which variable it is
You're the one who choose which variable to use in the input command... so you should know which one it is...

When you select the input number it shows two input boxes right? One for variable the other for input length... so the one that you put into the variable part is also the variable that you will check in the conditions branch...

PS: From my personal experience, since a lot of people here seem to be from the west side, these times are the ones with lowest activity...
I have merged your threads. Please do not create multiple threads for the same question, allow a reasonable time for people to answer (24 hours at least), and don't double post. You can view our forum rules here. Thank you.
ok srry and can you delete the post i made about this thread is closed

also i did what you said and the variable code wont change from 00000000
It won't change unless you input the numbers... and make sure that you're checking the right variable in the check part...

also number input relies on arrow keys, not number keys
The 00000000 is from the amount of digits you're using in the input number command.


You have two options when using the input number command: selecting a variable (which is where the number gets stored that the player enters), and how many digits. The digits determine how many numbers the player can input. So if you select 3 digits, the player can select up to 999. Pick 4 digits, and it's 9999. Right now, you have it set to 8, which is why you're seeing so many zeroes.


Frankly, I think you're just misunderstanding how it works. The player will use their arrow keys to up or lower the number, and when they press the action button, the number they input gets stored in a variable (the variable you picked out when eventing it). All you have to do, is use this variable in a conditional branch, and check if it's equal to the number 834834 or whatever the number is that you want. That's all.

Original thread: https://forums.rpgmakerweb.com/threads/code-event.17757/