Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How to prevent the player from moving while displaying multiple pictures?

So I'm using multiple Display Picture functions to make a sort of status screen, and it's bothering me that the player can move around while the status screen's up.

How can I have the player stay still while the status screen is up, and have a press of, say, the Z button close the status screen and resume control to the player?

I'm using VX, if that helps.
 
As a brief explanation, there are two main ways of preventing player movement:
-Use an Autorun event. During an autorun event, the player cannot move. This is typically used for cinematic sequences. You should only have ONE autorun event running at a time.
-Set a move route for the player. Set it to Wait x frames, and repeat that move route if you wish (if you do that you'll have to set the move route to a blank move route or something so that the player can move again afterwards).

Button pressing is a bit tricky. If you are doing all of this with events, generally you would use a Parallel Process. Within this parallel process, have a conditional branch which checks if the Z key has been pressed, then place in that branch the actions necessary to resume player control and close the status screen.
 
Well I don't use VX but there should be a Trigger option at the top of your Common Event in the database. If you click that, you can select Autorun. So while this event is running, the player will not be able to move, until this event is disabled.
 
I believe that's the switch for the activation of the event. So instead of calling the Common Event, you could instead turn on a switch when you want it to be activated, and then turn off the switch when you're done with it.

Otherwise, once again, you could also try setting a move route for the player, setting him or her to wait x frames. If you use this method, then you don't need to have the common event set to Autorun.
 
You want an actual number. It doesn't really matter, 1 is probably the easiest, just remember to make it loop.

And if you want to make the player press a button to close it, try something like this:
Code:
@>Loop:
  @>Conditional Branch: Button [X] is Pressed
     @>Break Loop
   : End Processing
 : Loop End

Too bad they took out Button Input Processing in VX.
 
Look, I just can't figure this out.

I can get the player to stay still while the status screen. pictures are up, but nothing happens when I press X to close the status screen.

I'm using that "make player wait for 1 frame" trick.

Do I need to turn "wait for completion" off?
 
Make your status screen an autorun event and have the item turn the condition switch on instead. To add an exit key, do something like:

Code:
@>Conditional Branch: Script: Input.trigger?(Input::B)
   # erase pictures and etc. related to the status screen and turn off the switch corresponding to the autorun event
: Branch End

So the player will be able to move again.
 
It might be because the key you're pressing isn't correct.

The one you specify in the database is actually different than the keyboard key. Here are the conversions:

Button = Key
"A" = Z, Shift
"B" = X, Esc
"C" = C, Space, Enter
"X" = A
"Y" = S
"Z" = D
"L" = Q
"R" = W
 
Regi":2bwrtd8d said:
It might be because the key you're pressing isn't correct.

The one you specify in the database is actually different than the keyboard key. Here are the conversions:

Button = Key
"A" = Z, Shift
"B" = X, Esc
"C" = C, Space, Enter
"X" = A
"Y" = S
"Z" = D
"L" = Q
"R" = W

Yes, that really helped.

Thanks, guys.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top