Lock code system[Request]

Officer Johnson

Villager
Member
Joined
Mar 25, 2015
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Hi everyone,

My first post so go easy on me.

I need a script that can make it i can make an event where in the event the player has to enter a few digit code to proceed kind of like a combination lock.

Thanks for any help.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Welcome to the forum!


First, you don't need a script for this. You just need to use event commands correctly. Note - there are events and there are scripts - they are very different things, so it would be good to learn what's what and use the correct terminology :)


The event command you're after is Number Input Processing. That will let you set a variable to a number input by the player (you can specify how many digits are allowed).


Then you just use a conditional branch to see if that variable is equal to the number they need to key in to unlock it.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Shaz gave you the perfect solution.  Since you're new to the Maker, I'd recommend playing around with creating events on a test map and just going through them all to see what they do, and try to come up with creative uses for each one.  That's one of the best ways to get started.
 

Officer Johnson

Villager
Member
Joined
Mar 25, 2015
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Welcome to the forum!

First, you don't need a script for this. You just need to use event commands correctly. Note - there are events and there are scripts - they are very different things, so it would be good to learn what's what and use the correct terminology :)

The event command you're after is Number Input Processing. That will let you set a variable to a number input by the player (you can specify how many digits are allowed).

Then you just use a conditional branch to see if that variable is equal to the number they need to key in to unlock it.
so just choose input number choose variable, choose digits amount. Then make conditional branch if that variable = to 4 digit number continue pretty much right?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top