The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => Topic started by: neutral12 on July 05, 2011, 08:54:01 PM

Title: [Resolved][RPGXP] Help with a picture event
Post by: neutral12 on July 05, 2011, 08:54:01 PM
Hello everyone. I have recently been trying to make an event where there is a sign on the wall of a restaurant in one of my cities (so basically, a restaurant menu). Once you click that sign, a picture will appear which is a menu. Then you click it once again to erase the picture. The problem I'm having with this at the moment is that while the picture is still up. You are able to move around. I don't want the character to be able to move while you're looking at the menu. Only when you click it a second time to remove the picture from your screen. I have not been able to figure this out, so I ask. What is the best way to do this sort of event? Thank you for your support.
Title: Re: [RPGXP] Help with a picture event
Post by: ForeverZero on July 05, 2011, 09:02:38 PM
Make it an autorun event.
Title: Re: [RPGXP] Help with a picture event
Post by: neutral12 on July 05, 2011, 09:04:07 PM
How so? Autorun events will just freeze my game.
Title: Re: [RPGXP] Help with a picture event
Post by: modern algebra on July 05, 2011, 10:13:59 PM
Well, if all you want to do is prevent the player from moving, then you can do a loop with a Player Wait right after like so:

@>Show Picture
@>Loop
  @>Set Move Route: Player
    :                      :$>Wait: 4 frame(s)
  @>Conditional Branch: The C Button is being pressed
    @>Break Loop
    @>
    :  Branch End
  @>Wait: 4 frame(s)
  @>
: Repeat Above
@>Erase Picture


It's untested, but I assume that would work. You might have to lower the number of wait frames.

NB: All of that would be on one page in the event where you select the menu.
Title: Re: [RPGXP] Help with a picture event
Post by: neutral12 on July 05, 2011, 10:41:44 PM
Ok, well, it sort of works. Only one thing about this code is not working right. I don't understand why this is. But it only displays the picture if I rapidly spam the action button... It confuses me as to why this is happening.
Title: Re: [RPGXP] Help with a picture event
Post by: modern algebra on July 05, 2011, 10:49:08 PM
Oh, yeah sorry - that's my fault - put some wait frames between the start of the loop and the Show Picture command - maybe like 20 frames or so.
Title: Re: [RPGXP] Help with a picture event
Post by: neutral12 on July 05, 2011, 10:58:21 PM
Thank you so much man, you rock. It works perfectly now. ;)