The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: caboose1408 on March 02, 2008, 05:03:05 AM

Title: How to input passcode for RM2K
Post by: caboose1408 on March 02, 2008, 05:03:05 AM
yea i really dont know how.
i mean
input: passcode
apply:(number)
right: advance
wrong: incorrect
Title: Re: How to input passcode for RM2K
Post by: Lein on March 02, 2008, 02:27:10 PM
Are you saying you want to be able to press different numbers and if it's correct, you go through?

If that is it, I can help you.

Title: Re: How to input passcode for RM2K
Post by: viperviper on March 29, 2009, 02:17:44 AM
Quote from: Lein on March 02, 2008, 02:27:10 PM
Are you saying you want to be able to press different numbers and if it's correct, you go through?

If that is it, I can help you.




Lein, please do... i'd love to see a script about what you're saying. Like in the scenario where you'd come to an event in the game where you'd have to input a passcode in order to continue further in the game beyond that event.

Hook it up  thanks ^^
Title: Re: How to input passcode for RM2K
Post by: Sirius on March 29, 2009, 02:39:47 AM
First things first, Welcome to RMRK  ;D It's a good place, you'll enjoy it here.

Second thing, I'd advise against posting in topics more than 3 months old, it's called necroposting & people don't like it ( 'cause most likely the topic creator doesn't care at this point)

Third thing, I think I can get that particular event to work, I'll start working on it & I'll get back to you when I come up with something.
Title: Re: How to input passcode for RM2K
Post by: Sirius on March 29, 2009, 03:50:23 AM
Okey dokey, I got something here. It's pretty basic, but you can change it up to fit your needs. But first, let me clarify. I don't use the cool little code function that often  :-[

First make a variable called Input, and make sure it's set to 0. What the Key Input function does is assign all pressable buttons a number between 1-24. When you press a key, the variable immediately switches to the value of the button you pressed (for example, pressing the right key will make your variable equal to 1, pressing up will make it equal to 4, etc.). That's why the code says "(Whatever button you want it to be)," just set it to the number of the button you want pressed. Hopefully that made sense.

<>Message: Insert the first button.
<>Key Input Proc [xxxx:Input]
<>Branch if Var [xxxx:Input] is (whatever button you want it to be)
    <>Message: Correct. Now input the second button.
    <>Key Input Proc [xxxx:Input]
    <>Branch if Var [xxxx:Input] is (whatever button you want it to be)
        <>Message: Splendid. Now input another one.
        <>Key Input Proc [xxxx:Input]
        <>Branch if Var [xxxx:Input] is (whatever button you want it to be)
Etc...
        : Else Handler
       <>Message: You lose!
       <>Variable Oper [xxxx:Input] Set, 0
    End
    <>
Else Handler
<>Message: You lose!
<>Variable Oper [xxxx:Input] Set, 0
End


You can fluff it out to make it awesome, too, that up there is just the absolute bare minimum of its power. If you add pictures, battle animations, and sound effects, it's a really cool feature (Resident Evil 5, anyone?)
Title: Re: How to input passcode for RM2K
Post by: viperviper on March 29, 2009, 11:26:23 PM
hey i tried to script, What it does is wait for me to input the right button, but doesnt do the "else handler" Wrong! message if i input the wrong button.  I can press everything until i finally get the right button... I followed the script exactly. I'm starting to understand the concepts but can't fix it on my own. Thanks Sirius, Oh and how do i give credits, i thought i saw something about that somewhere.

so yah what is wrong or am i doing wrong that doesnt let me have a wrong input button to cancel the event.
Title: Re: How to input passcode for RM2K
Post by: Sirius on March 30, 2009, 12:01:26 AM
Quote from: viperviper on March 29, 2009, 11:26:23 PM
hey i tried to script, What it does is wait for me to input the right button, but doesnt do the "else handler" Wrong! message if i input the wrong button.  I can press everything until i finally get the right button... I followed the script exactly. I'm starting to understand the concepts but can't fix it on my own. Thanks Sirius, Oh and how do i give credits, i thought i saw something about that somewhere.

Oh, right, I should have mentioned that. When you're setting the key input, make sure all four directions are checked. That way the variable will change when you press the key, thus making you fail if failure is due.

Credits are easy. Either at the beginning of the game or the end, just say thanks for any extra resources you used. For example:

The End
Credits
_Random dude who made a McDonalds chipset_ for his McDonalds chipset

Charas Project for their sprite creator and huge database

viperviper for his super in-depth CMS

Etc.
Title: Re: How to input passcode for RM2K
Post by: viperviper on March 30, 2009, 12:30:52 AM
Sweet Deal!!! You guys can consider this post Resolved. Thanks Sirius, hey... when i said how do i give credit i meant as in for your Rep on this forum if it works that way lol.
Title: Re: How to input passcode for RM2K
Post by: Sirius on March 30, 2009, 12:43:46 AM
Oh haha, my bad. I think you need something like 75 posts to give people Rep.
Title: Re: How to input passcode for RM2K
Post by: Holkeye on March 30, 2009, 12:48:38 AM
I +repped him for you~
Title: Re: How to input passcode for RM2K
Post by: viperviper on March 31, 2009, 02:21:45 AM
THANKS GUYS
Title: Re: How to input passcode for RM2K
Post by: Holkeye on March 31, 2009, 03:38:50 AM
On a side note, why doesn't Sirius have more rep? I've seen him help a lot of people here, and never noticed that nobody even bumped him once. Not that rep matters, but I felt a little bad. I'm going to give him some more.
Title: Re: How to input passcode for RM2K
Post by: Sirius on March 31, 2009, 04:13:16 AM
Wow, thanks. I just figure I should help people out with what got me tripped up before. It's kind of a pay it forward thing I guess.