Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
Hello good day.

i am using the falcao mouse button script to use the mouse in my game.

There are some menus of my game that I show through images and to scroll through the pages you must use the arrow keys (<- ->) and this is somewhat uncomfortable.

Is there any way to execute a common event (to move to other images) by clicking on a corner of the screen? for example in a corner of the image with specific coordinates?

I do all this so that the player can go through the pages by clicking on the coordinates where the arrows that indicate turning the page are. (See next picture)

Sin título.png

Thanks.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,137
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
What are you using to show the images?
A script or an event?
Basically how do you get to the place where you are showing images?

If it involves a scene like the menu then adjusting the script for that would be the option.
If it's an event, then you will need a parallel process event to check the mouse position and activate the CE when clicking.
 
Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
What are you using to show the images?
A script or an event?
Basically how do you get to the place where you are showing images?

If it involves a scene like the menu then adjusting the script for that would be the option.
If it's an event, then you will need a parallel process event to check the mouse position and activate the CE when clicking.
hello.

I am using a common event to display the images.

when the player presses the left arrow, it goes back one page (image), when he presses the right key, it goes forward one page (image)
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,137
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
So the common event is always running (parallel process) for that scene?
Then just do a conditional branch check for mouse position.
You can do a script check or the conditional branch check.

Script check

Ruby:
if $mouse_cursor.x <= 30
  if $mouse_cursor.y.between?(200, 240) # again position for size of button
    if Input.trigger?(:C)
      $game_temp.reserve_common_event(3) # common event number
    end
  end
end
if $mouse_cursor.x >= Graphics.width - 30 
  if $mouse_cursor.y.between?(200, 240) # again position for size of button
    if Input.trigger?(:C)
      $game_temp.reserve_common_event(4) # common event number
    end
  end
end
 
Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
forget it, I already understood how to put the code in conditionals.
thanks, it works great, have a nice day!
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,137
Reaction score
1,109
First Language
English
Primarily Uses
RMVXA
here
1647734529032.png
1647734539184.png
if $mouse_cursor.x <= 30 -> why 30?
if $mouse_cursor.y.between?(200, 240) -> why 200 or 240?

i don't understand.

WOW, you don't know about the size of the graphic? or you don't know about screen pixel resolution? The whole time you've been using the mouse script and the addons I gave you, you never looked at the code?

1647734715130.png

You understand that the resolution of the window for VX Ace by default is 544x416
so X goes from the left at 0 and increases as you move right until you reach max X at 544.
And Y goes from the top at 0 and increases as you move down until you reach max Y at 416
XYpos.png

Now I gave you the script check as you can put everything into one spot. The conditional branch process would be quite long and just more clicking.

It's also weird that you blocked out all the names of the scripts.
I don't think anyone would care what scripts you're using unless you got them without paying for them or some other nefarious thing.
 
Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
here
View attachment 220419
View attachment 220420


WOW, you don't know about the size of the graphic? or you don't know about screen pixel resolution? The whole time you've been using the mouse script and the addons I gave you, you never looked at the code?

View attachment 220421

You understand that the resolution of the window for VX Ace by default is 544x416
so X goes from the left at 0 and increases as you move right until you reach max X at 544.
And Y goes from the top at 0 and increases as you move down until you reach max Y at 416
View attachment 220422

Now I gave you the script check as you can put everything into one spot. The conditional branch process would be quite long and just more clicking.

It's also weird that you blocked out all the names of the scripts.
I don't think anyone would care what scripts you're using unless you got them without paying for them or some other nefarious thing.
I already understood how to put the code in conditionals.
I haven't had a good day, my head is somewhere else haha.

thanks
 

Latest Threads

Latest Posts

Latest Profile Posts

Dog saliva is an antiseptic.
NghNgE9.gif
Oh man. IGMC's finally back. I really want to participate, but I'm not sure if I have the time.
It is DC's turn to be celebrating her leveling up and starts her 20th year. We were many to think she wouldn't live that long. Starts your cats motors and make 'em purr!
why_hello_mira.jpg

I made myself a cult leader, and a concept scene for him as well. :LZSexcite:

Forum statistics

Threads
123,316
Messages
1,155,722
Members
161,736
Latest member
sm0ll
Top