Conditional Branch Button Press?

Status
Not open for further replies.

DayLITE

Warper
Member
Joined
Dec 23, 2013
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Hello everyone.
I usually keep to myself and never usually ask for help (I'm a stubborn unowatsit)
However I have hit a wall that seems indestructibale.

Remember reading files in most survival horrors?

massacrenewspaper1.png

massacrenewspaper2.png

 

I'm trying to do something similar here but I need to the player to be able to press a button to 'flip the page' as it were.
I'm using a condition branch atm:

event.png

What puzzles me though is that not only doesn't the key press work (Not matter what A is assigned to) it doesn't seem to register.

I obviously missing something. Can you kind people help me?

(also is it possible to disable certain key inputs? I don't want people running off whilst the event in progress)

Thanks in advance!

massacrenewspaper1.png

massacrenewspaper2.png

event.png
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
you can have a parallel process checking if a key is pressed... because right now, it will only check for the button press at the exact time that the 30 frame wait ends... 

else, I think Tsukihime has a script for this
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,763
Reaction score
14,007
First Language
English
Primarily Uses
RMMV
The way you have it set up, it will check for a key being pressed at the exact moment the event is run (and the page is displayed) - it is a "is key being pressed NOW" check, not a "wait for key to be pressed" command. You need to have a loop that continually checks for key presses.


So create a second event that's set as parallel process that just does the checking for key press and takes the appropriate action, and condition it by a switch. Then in your existing event, instead of checking for keys, just turn on the switch. Make sure the switch is turned off again when the book is closed.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,776
Reaction score
7,872
First Language
German
Primarily Uses
RMMV
you're displaying a picture with the text on the picture - in that case don't even bother with the conditional branches or parallel process, there is a much easier way:

1) command "show picture"

2) command "show text" with empty text and window set to transparent (creates an empty and invisible message waiting for confirmation)

3) command "erase picture"

No need for extra waits or button checks
 
Last edited by a moderator:

DayLITE

Warper
Member
Joined
Dec 23, 2013
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Thank you adiktuzmiko & Shaz

It's working! 

Andar I almost resorted to doing that but I prefer the effect of my own text on there.
Thanks for the advice though.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
Andar's method is actually faster and I think more efficient... and it doesn't really change anything to be on the bad side, you still just show the picture, then the event won't proceed until the player presses A (so he can't move too etc, which is you wanted too right?)

The text is still the one on your picture... you will not put a text in the show text box, you're just gonna use it so that the event doesn't proceed until the player presses A...
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,763
Reaction score
14,007
First Language
English
Primarily Uses
RMMV
Andar isn't saying to USE Show Text to show your text. He's saying to show the picture, and then to use Show Text with NO text and a transparent text window to make it wait for a button press. So your picture will be displayed, and the game will wait for the player to press a button (behind the scenes it THINKS it's showing text and waiting for you to close the text box, but that's not what the player sees). It's actually a very good and easy way to do it.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

2021? I still wonder if people still doing MV than MZ more
Seeing a lot more active Ace topics recently, is it making a comeback? :o
0-7, left-to-right, top-to-bottom
As soon as I'm able to get out of bed I'm probably gonna go so hyper from being too cooped up, and burn myself out into another awful flare. lol
It makes me feel proud whenever an RM game does well. Even though I had nothing to do with it.

Forum statistics

Threads
107,627
Messages
1,031,013
Members
139,746
Latest member
Krunga
Top