Checking input against for variables to unlock padlock.

I have an event set up that generates four random numbers between one and ten, this all runs fine.
I want the player to look for these numbers and use them to unlock a padlock, so I have them enteringen the numbers.
But I can't figure out how to check the input variable against the four variables.

The value of the variable "padlock 5" keeps resulting in 0
But I can't figure out how to check the input variable against the four variables.
Do you want to simulate 4 digit input?
If yes, you need to multiply padlock 2 by 10, padlock 3 by 100, and padlock 4 by 1000 before sum together. So they will occupy different digit place.

The value of the variable "padlock 5" keeps resulting in 0
Can you show the number by using show text \n[14]?
Do you want to simulate 4 digit input?
If yes, you need to multiply padlock 2 by 10, padlock 3 by 100, and padlock 4 by 1000 before sum together. So they will occupy different digit place.
Okay great thanks, the multiplying shouldn't be a problem, still not quite sure how to sum them together, I might be asking a lot but if you could me an example of what the event is supposed to look like that would really help

Can you show the number by using show text \n[14]?
Yes, I have an event trigger by action button that gives the values in text, \n[14] is always 0 though
Yes, I have an event trigger by action button that gives the values in text, \n[14] is always 0 though
Sorry, I meant \v[14]
I do indeed, it does now return the sum of the four digits.
0010 does unlock the box, but I need the box to unlock with 7003 (again, these are randomly generated)
1612053835497.png
1612053867464.png
Here is what you need to do for code generation
You don't need 4 variables, just one is enough.
Screenshot_655.jpg

Screenshot_656.jpg
Thank you so much, this completely solved my problem.
I have no words to express my gratitude, I really appreciate this a lot.
I am having another issue that I posted a thread about, but no one has come up with a solution yet.
Would it be to much to ask you to take a look at it?
Actually I was bit premature, see I need them to be four different variables because each numbers can be found on one of the four different floors through text, unless there's a way to do this with one variable of course
Actually I was bit premature, see I need them to be four different variables because each numbers can be found on one of the four different floors through text, unless there's a way to do this with one variable of course
Nothing is stopping you from keep using 4 variables.
The step is still the same, you just change the variable used for the second and up to the fourth digit using a different variable.
Yes it works!
I was stupid an forgot to turn off a self switch.
Again thank you so, so much

However now when I go to check the numbers on the floors, they show me the multiplied numbers instead of the single digit.
However now when I go to check the numbers on the floors, they show me the multiplied numbers instead of the single digit.
An example:
1612057868689.png
However now when I go to check the numbers on the floors, they show me the multiplied numbers instead of the single digit.
You can just revert back the value by division after sum
Yes of course sorry I wasn't thinking clearly, it's 3 AM here and I'm very sleep deprived.
If you want to help me out with the other problem here is the thread:
If not I totally get it you have already done a lot for me, thank you very very much.
Yes of course sorry I wasn't thinking clearly, it's 3 AM here and I'm very sleep deprived.
If you want to help me out with the other problem here is the thread:
If not I totally get it you have already done a lot for me, thank you very very much.
Ao Oni cross-map chase player is complicated, and if I were to implement it (which I'm not going to), I might just write a plugin for my personal use instead of trying to make it work in an event or even release it for the public. And I don't think I could even explain to people, let alone making sure my solution work. So yeah, pass.
Totally understandable, I guess I will have to resort to scripted encounters/semi random encounters with timers.

Thanks for taking a look at it though.

Original thread: https://forums.rpgmakerweb.com/threads/checking-input-against-for-variables-to-unlock-padlock.132856/