[VXACE] Numbers causing actions?

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I know that you can use the script call in conditional branches, "Input.press?:)__)" for a keystroke to perform a certain action. I use it in different parts of my game, but I have not been able to make numbers work.

I'd think it wouldn't be too hard since games like Yume Nikki and Oneshot use numbers. Does anyone know how to do it?
 
Last edited by a moderator:

Kvich

Veteran
Veteran
Joined
Oct 6, 2014
Messages
89
Reaction score
19
First Language
Danish
Primarily Uses
I'm firstly wondering exactly what you mean.

What do you want the input_numbers to do?

You want the players to be able to put in a number for like a code? say they have to put in the right numbers to open a door.

Or the players to put in a number, and then they do a action upon that?

Edit:

I think, depending exactly on what you want, that maybe you could call "input number" and store it in a variable, and have a conditional branch sort out the rest depending on what the player puts in.
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Specifically, I want numbers to play sounds. It's a sort of mini game where you have to play a ditty on a toy piano, numbers corresponding with the 8 keys. So you click a number, play the note, and then when you play them in the correct order, you beat that part (the last bit about playing them in order... that I also don't know how to program but I figured I'd tackle one thing at a time.)
 

Kvich

Veteran
Veteran
Joined
Oct 6, 2014
Messages
89
Reaction score
19
First Language
Danish
Primarily Uses
Then the Input number won't work as intended - as it would disrupt the game to much I think.

My first instinct tells me that there might be a script that can add it, as I don't think (This is not really my strong point so I may very well be very wrong) the game directly support the number keys. (Again I may be wrong)

I think it's a matter of adding the number keys as supported keys, and have a event calling for button pushing, and have a handful conditional branch acting on the keys pressed, like pressing "1" will play sound "A"
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The Input.press:)?) arguments refer to the pre-set buttons that are available for use - the ones you see when you hit F1 while playing. The whole keyboard is not mapped - just a few select (character) keys.


If you want to be able to use other keys, including the numbers, you will need a keyboard script.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
The Input.press:)?) arguments refer to the pre-set buttons that are available for use - the ones you see when you hit F1 while playing. The whole keyboard is not mapped - just a few select (character) keys.

If you want to be able to use other keys, including the numbers, you will need a keyboard script.
Do you have a link to a specific character script I could use? Or should this go to the script help forums to request one?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Moving to RGSS3 Script Requests


There are keyboard scripts out there. Did you search the Master Script List?
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I've looked at several scripts, and none seem to fit what I need.

I basically need someone to walk me through the process of some of these scripts, because if I DO find one that I think will work, apparently I don't use it correctly.
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You need both scripts there, so put them both into your project (the keyboard script itself as well as the Interpreter patch).


In your Conditional Branch, select the Script option (bottom of tab 4), and put

Input.key(x)where x is one of the symbols defined in KEYMAP in the script. This list is right at the top of the keyboard script.
So if you wanted to check for the 1 key being pressed, you'd use Input.key(KEY_1) or Input:KEYMAP[KEY_1] (though maybe that should be :: and not just :


Try a few variations and see if you can come up with something that doesn't throw an error.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top