Show Picture, Book event crashes game. Help?

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
So rather than cut scene tutorials, I'm thinking of giving the option of using tutorial books. That count towards the book reading achievements. That and starting the game, with all the stuff a person can do. A short little game guide thrown in there for the users enjoyment would be nice. 

So I made 4 mock pages and threw them into a conditional branch. So when Left Button is pressed, it'd 'move' to the next page. 

The second I picked the read option. My game crashed. Any idea what I did wrong, or where the problems at? 

Screenshot (20).png

Screenshot (21).png

and here's two of the mock pages [one is blank, the other with a window] 

Blank Page Base Left Page No Window.png

Blank Page Base Right  Page.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
That error usually means that it cannot read the picture file or has any other problems with it. Which means you have to check the pictures if they're OK.


And behold - your first show picture command doesn't have a name for the picture...


Additionally, you should use different numbers for different pictures - otherwise timing problems can cause similiar crashes
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Fixed that and it doesn't crash. But now when I do the "Press Left Button [conditional branch]" my character moves, and the page stays the same, rather than erasing and moving onto the next one. 
 

Soul

Veteran
Veteran
Joined
Aug 14, 2013
Messages
222
Reaction score
59
First Language
English
Primarily Uses
Make a new page where the event triggers with the action button, turning Self-Switch A on. Turn the page with those branches into an "Auto-Run" event to keep the player from moving, only to appear when self-switch A is on. Should fix your issue with the player moving.

You could always just have separate pages that work the same way, should that not fix your issue with the pages. Just have them activated by other Self-Switches. Just make sure that when their switch has been flipped, right below you place a command that will turn off whichever current one happens to be on. You could more easily set up a conditional branch that allows the player to go back to the previously shown page. Could also throw in a conditional branch that when a button is pressed, it just closes the book (ie. erases the picture and turns off the current pages self-switch).
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
Sir, your event... you do it wrong...

There is lot of things I would like to comment about it.

  1. The problem is : You show "nothing" at first place. And in next sequence, you erase that "nothing" and that's what lead you to the error.
  2. You use all same picture ID. If you want to show multiple picture, use different ID.
  3. But if you intend to only show one picture and update it everytime player press button, you don't need to erase it first. Just show it regularly.
  4. Setting the picture origin to "center" will not automatically show the picture on center screen. You need to set the x and y coordinate, telling the game where is the center you mean. By default the center screen x = 272 and y = 208.
  5. This is most fatal one. If you want the game to wait until the player pressing the button, you need to trap the event in a loop first and put wait(1) so to not let the game freeze in loop. And then put a delay (wait about 20~30 frame) for everytime the player press a button so to not let the button update check the button pressing every frame. The game will not know the difference between first, second, etc button pressing, so use a variable. Here I fix it here : http://oi61.tinypic.com/hv71g6.jpg
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Sir, your event... you do it wrong...

There is lot of things I would like to comment about it.

  1. But if you intend to only show one picture and update it everytime player press button, you don't need to erase it first. Just show it regularly.
  2. Setting the picture origin to "center" will not automatically show the picture on center screen. You need to set the x and y coordinate, telling the game where is the center you mean. By default the center screen x = 272 and y = 208.
  3. This is most fatal one. If you want the game to wait until the player pressing the button, you need to trap the event in a loop first and put wait(1) so to not let the game freeze in loop. And then put a delay (wait about 20~30 frame) for everytime the player press a button so to not let the button update check the button pressing every frame. The game will not know the difference between first, second, etc button pressing, so use a variable. Here I fix it here : http://oi61.tinypic.com/hv71g6.jpg
I'll fix the coordinates, but your image pic isn't showing up on the link. Can you insert it into the image tag? 

Make a new page where the event triggers with the action button, turning Self-Switch A on. Turn the page with those branches into an "Auto-Run" event to keep the player from moving, only to appear when self-switch A is on. Should fix your issue with the player moving.

You could always just have separate pages that work the same way, should that not fix your issue with the pages. Just have them activated by other Self-Switches. Just make sure that when their switch has been flipped, right below you place a command that will turn off whichever current one happens to be on. You could more easily set up a conditional branch that allows the player to go back to the previously shown page. Could also throw in a conditional branch that when a button is pressed, it just closes the book (ie. erases the picture and turns off the current pages self-switch).
I'll move it to a self-switched event on auto-run, and give it a go. 
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Here :



Problem happens at the end. Where the break loop would happen. It instead stays on, and button pressing Left cycles through animations quickly. I even added Greater to or = to 4 [the number after my last page]. And it still has that problem.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
Put "erase picture" at the very end. I can't screenshot further below.

There are not supposed to be any animation. If it cycles too quickly is because you keep pressing the left button. Just tap it or increase the delay "wait 30 frames" to something higher. Though I believe 30 is enough.
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Put "erase picture" at the very end. I can't screenshot further below.

There are not supposed to be any animation. If it cycles too quickly is because you keep pressing the left button. Just tap it or increase the delay "wait 30 frames" to something higher. Though I believe 30 is enough.
I run into two problems with your event.

1) if all on one page rather than it being an action triggered event to send me over to Event Page two. The book doesn't show up at all. 

2) I either still have that animation error if I have each Conditional Variable under one another. Or I move it to a Block format like you had 

Screenshot (23).png

Screenshot (24).png

Screenshot (25).png

And I still get the errors.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
Nooo, you do it wrong!

Don't put those conditions inside the "button pressed" condition. Puti it outside, but still in the loop.

Pressing the button only change variable and activated self-switch A.

The condition self-switch A == ON contain the actual process.

EDIT :

I notice your event page already using self-switch A. So you should using self-switch B instead, both the trigger and condition.
 
Last edited by a moderator:

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Nooo, you do it wrong!

Don't put those conditions inside the "button pressed" condition. Puti it outside, but still in the loop.

Pressing the button only change variable and activated self-switch A.

The condition self-switch A == ON contain the actual process.

EDIT :

I notice your event page already using self-switch A. So you should using self-switch B instead, both the trigger and condition.
I have that because if I have it all on one page. The book graphic won't show up [the icon that shows the book], and the event when I run into won't activate.

Doing the fix [move the Variable thing down to the end branch bit]. Causes the event to cycle indefinitely. Even with the Greater than = to Break Loop command at the end. It seems to utterly ignore that command. I gtg. 

Screenshot (26).png

Screenshot (27).png
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
It's because that page already using self-switch A.

Change everything to self-switch B both for trigger and condition excluding the page condition.
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
What I meant is I got rid of that page several times going back and forth. Removing the Self Switch = A bit. With the self-switch A on Event page one, and nothing on two. I've even gotten rid of event page two altogether. 

With the script nestled within the Press Left Button, I get it to go through. But after the 4 or Greater page. It simply resets, but at a much higher rate. 

I got rid of Event Page two, so there was no Self Switch A [self Switch A, was to do the part before the loop]. As is. On one page with no self switches, and under the SE command. It repeatedly loops everything, and plays the sound at a constant loop ignoring button presses,  as well as scene changes. Does it work for you when you plugged it in? If so then it's my lappy [also how are you removing the else statements on your conditional loop?].  

But yeah, I can find tons of good book programs for VX, but none for VX Ace. All I really need boils down to "show img", "Button press to next page", "at end of sequence close". 

Edit:

Still on a technical aspect that event you put up should work like a charm. I have no idea why no matter how I spin it, it keeps on going all derpy with me. Regardless of keeping it up like you have it on the page, or splitting it up from pre-Self Switch A, to post self switch A. ... By the way why do you have Multiple Self Switches of the same type for the same event? But only turn it off once?  
 
Last edited by a moderator:

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
It's only my habit to neat things up. For these, any mean will do. But in case I wanted the game to check multiple button condition, I don't need to copy all the process to every condition. Let's just say, you also want the game to check the "right button", so you can process the book event back and forth both way. Will you copy all the same process?

I initially activate self-switch A so it runs the process immediately when entering the event. I also activate self-switch A when player press left button. The self-switch A condition contain the whole process and turn off itself at the end.

These whole point means : I made a container (named self-switch A) which will only run initially at first AND when player press left button.
 

Here lies what my event do.

@> Page number == 0 (resetting page number)

@> Activate switch A!

@> repeat everything here
  @> I press left button ("pressing" is different from "tapping" so the game will always check your button based on "update rate")

    @> page number +1

    @> Activated switch A!

  @> end

  @> Content of switch A (obviously, will only runs when switch A is activated)
    @> show picture X, if page number equal to 0
    @> show picture Y, if page number equal to 1
    @> show picture Z, if page number equal to 2

    @> break from loop if page number equal to 3
    @> delay of 30 frames (because you want your button to "tap", not "press". Though this is only alternative.)

    @> Deactivated switch A (because you only want this container to run once per condition met)
  @> end

  @> delay 1 frames (this is work as the "update rate" so the game doesn't freeze in loop)

@> Keep looping
@> Erase picture
Looping is actually one of those advanced eventing.
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Sounds, good. But even when I fixed it up so it read as yours did. It caused a cycle where regardless of button presses once it hit the SE bit. It skipped the looping process and just hit the SE bit repeatedly. The bit where I did it wrong, it would restart the process rather than breaking the loop (even with a 4 or Greater Variable count on on Page Variable. Would still not break the process.). 

Does it work for you though when you plug it into an event? Or do the pages recycle themselves as well when you test out the code? Because on a purely technical aspect. That code you put up should work (and I'll try it on other things later.). But in practice, when I copied it [and fixed the little kerfluffle you pointed out]. It doesn't work. I get one page no actor shown, the next page the actor pops up. After 4 pages. It goes back to the beginning, but doesn't wait five frames before button presses, and it simply speed through the animations without breaking. 
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
It caused a cycle where regardless of button presses once it hit the SE bit. It skipped the looping process and just hit the SE bit repeatedly. The bit where I did it wrong, it would restart the process rather than breaking the loop (even with a 4 or Greater Variable count on on Page Variable. Would still not break the process.).
You didn't turn off the self-switch, or you turn off the wrong self-switch. =_=

I get one page no actor shown, the next page the actor pops up. After 4 pages. It goes back to the beginning, but doesn't wait five frames before button presses, and it simply speed through the animations without breaking.
Your event already used self-switch A, so use another self-switch. Change both the trigger and the conditional branch that use self-switch A to B.

*sigh* not sure what goes wrong.

Maybe I'm the one who got it wrong.

Maybe Gaia doesn't allow you to fulfill your goal.

Either way, I made a demo : https://db.tt/PKMXGovr

I use a switch so it doesn't clash with any self-switch.
 

TheGreatEater

Coding is my dump stat.
Veteran
Joined
May 20, 2015
Messages
393
Reaction score
206
First Language
English
Primarily Uses
N/A
Yeah it was the self switch that was the problem. That demo was a perfect. Thanks, it's actually a good view for things to use in other stuff as well.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top