Is this event done right?

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
556
Reaction score
128
First Language
English
Primarily Uses
RMMV
What i am trying to achieve is for the screen or mouse to be press, after the press the player would be transferred to map location. All while erasing the picture and hiding the button created using Galvs Screen buttons.
The issue is that i can get the button i created to show along with image but i cannot seem to get the button press to work and perform what is below the if statement on it.
Can anyone help me spot what I am doing wrong?


2020-07-03 01_09_22-Window.png
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,415
Reaction score
4,811
First Language
English
Primarily Uses
RMVXA
Generally when I have an issue like this I like to narrow down which part isn't working by checking one Conditional Branch at a time, separating each part into its own non-nested branch and making sure each part is running correctly (or not) by placing a message box or sound effect command inside its branch. If I have a complex condition, I also like to try to separate that condition into two or more separate non-nested branches.

Immediately suspicious to me are your check for "If: $gameScreen.picture(1)", which I think just checks for... the existence of that picture, or maybe just always returns true?, and your use of "addButton" as part of an If-Branch's condition (is there some more appropriate method, like buttonPressed or clickButton?). But I'm not familiar this plugin, so it's at least possible your scripted conditions are correct.

Even more suspicious, though, is the fact that you have 4 different pages in this event, and this is Page 1. While any of the other pages' conditions are met, this event body will never be run - and therefore all of these checks that you're displaying will actually be ignored.
 

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
556
Reaction score
128
First Language
English
Primarily Uses
RMMV
Ah yes, those pages will become active after a switch is flipped on next map that the player will be at. All based on the results of that map. That's why it's 4 pages and you are correct. The $gameScreen.picture(1) is just to check if such picture is being showed. This way the condition below can become active. Otherwise it wouldn't show the image button at all.
I have tried separating the Branches but honestly, im still at a loss.
Button press still won't active what's below the if statement.
I've checked the script several times and it's correct.

This one has been tricky for me haha

Edit*
Found a better solution to using Galvs screen buttons.
Much easier to use. If anyone is interested in knowing. Let me know in pm.

Can a moderator close this please
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

How do you cure sleep problem? It has been 7 months and it's 3 AM now..
Darn you, Seals! Why do you gotta be so cute when on land?:kaoluv:
So dragonbones getting laggy xD
I even removed the fingers armatures.

Have to remake this guy after crashing ( corrupted file).
:rtear:

Although limited to only this shop for room decorations, I like this aspect for previewing items.

Forum statistics

Threads
100,837
Messages
980,129
Members
132,487
Latest member
AnthonyDewitt
Top