MV Aim like quick event

Hello all! in one part of my game, the protagonist is equipped with a crossbow, to be able to hit a stone button in a dungeon.
so to make it interesting, I wanted to create a simple thing like this:
Screen 1.png
Screen 2.png
Screen 3.png


the RED Marker is a IMG, moving Left and Right, continuosly. and if you shoot in the right moment, ofc you hit the stone button. I was trying to use event to do this, but I saw that the only option to get X,Y and convert it into a variable value is the player’s position. Any ideas ? or plugin already done that can help me ?

thanks for any help!
create a image, and move it from start X to end X and repeat.
check X position start/end for the OK check (-3 and + 3 from goal).

so let say, image size is 30x30, and range is 100.
so if x is between 47 and 53, you hit the target, else you misses.

you can erase the image after wards if you want, as hiddenone made
a [quicktime event] which you could follow.

just alter it slightly and you got what you want 🙂
create a image, and move it from start X to end X and repeat.
check X position start/end for the OK check (-3 and + 3 from goal).

so let say, image size is 30x30, and range is 100.
so if x is between 47 and 53, you hit the target, else you misses.

you can erase the image after wards if you want, as hiddenone made
a [quicktime event] which you could follow.

just alter it slightly and you got what you want 🙂
wait wait,I know the math behind the idea in general, just don’t know how to implement it with rpg maker events. How the software can know when X is random number or an other random number ?
"
check X position start/end for the OK check (-3 and + 3 from goal).
" I have never seen a function that checks the position of X

Ah! you posted a link of what i say, Thanks I’ll give him a reading to study it
Holy Sh@!#! i didn't think was too complicated xDxDXD for something like this
there are multiple methods, easy, average, complex.

you can simple set a background (temp) to set the marker range.
so you can see if its moving inside it correctly.

than set a starting position so it moves from left to right and repeat
till Input.isTriggered("ok") and break the loop and see if it hits or misses.

read the QTE on it how it works, you can position it.
as most is explained there, you get a pretty good idea how it works.

minor range for hit is useful, so you have a range of 6pixels for hit.
depending how fast it goes or how slow.

if your stuck making it work, I see if I get some time to help, but also busy
on my end currently.
there are multiple methods, easy, average, complex.

you can simple set a background (temp) to set the marker range.
so you can see if its moving inside it correctly.

than set a starting position so it moves from left to right and repeat
till Input.isTriggered("ok") and break the loop and see if it hits or misses.

read the QTE on it how it works, you can position it.
as most is explained there, you get a pretty good idea how it works.

minor range for hit is useful, so you have a range of 6pixels for hit.
depending how fast it goes or how slow.

if your stuck making it work, I see if I get some time to help, but also busy
on my end currently.
Soooo i understand the logic of the mini game, i set it all... it work, most the time. I Encounter some problem but step by step y try to figure out.
1. it the tutorial she Set all the IMG Starting by center, not by left corner as usual, if i set like this, all go wrong :S
2. the green Area uses the same Y of other thigs, if i do the same its a little out of the Red bar.. so i create a specific variable for that and move it.
3. The main problem for now..is, If the green zone is placed towards the end, even when I center the target I make an error, as if there is the image but there is no consequent X in the variables to trigger the "Hit the green". The difference between me and the tutorial is the resolution of the game. i'm running at 1366x768. She put the random number between 400 to 700 y only changed to 500 to 800
Would something like this be close to what you were thinking?
Spoiler


Here is what I did for my event:

event.png


Notes:
- Establish variables, allow for speed input, show pictures on the screen (target, crosshair, and bullet holes), allow the target to move the crosshair back and forth with some code, loop with 1 wait frame and wait for the player to press "ok".
- When OK is triggered, register the new picture (bullet hole), increase variable and check for coordinates to be within range (yellow dot) for bullzeye. Record that amount and check for how many bullzeyes there were.
- If no shots are registered, then message "no bullzeye"
- Break loop and reset scene (remove pictures and set variable 1 back to 0.

I can explain the code a bit more if needed.


I'm not too sure about the SRD QTE plugin but if it is working the way you want, then by all means, go for it.

Also, it looks like you can find a specific coordinate by clicking on the screen (exactly where you want), and then press F8/F12 to open the DevTools console and run this code to the get the X and Y screen coordinates of the last click:
JavaScript:
console.log(TouchInput.x, TouchInput.y);

Original thread: https://forums.rpgmakerweb.com/threads/aim-like-quick-event.178983/