[MV] Show Indicator in front of Player for Tools / Farming

MAIN TOPIC:
Hellooo all, first of all I hope your day is going wonderful~~
Now onto the request, I want to have an "indicator" show up on the tile before the player to show where the player's tool will hit. I would like the image to be a picture because that will not interfere with spawning an event there, as well as be better for performance.


-------------------------------------------------------------------------


ANSWER (found by @fizzly!)​
I am using if player is moving and if player has changed direction conditions on top of the following answer!


Here is the event to turn it on, turn it off when going into maps where tools/etc are not used or do not need an idicator to decrease performance drain!

1584212181028.png


Here is the common event to run:
1584212295818.png

1584212287832.png




Rest of old post info:​
​
Spoiler
EDIT: I had a plugin made to check if the player changed direction, made by a wonderful member called @Raizen! It was at that moment I realized, I have no idea how to keep the image in front of the player!​


-------------------------------------------------------------------------​


Example of what I am looking to do:​
Spoiler
Specifically to show the "targeted" tile in front of the player using a png/indicator (like a square).






1583941009906.png
1583943543392.png





  • I am looking for something very lightweight, something that won't cause issues with yanfly/ocram/galv plugin cores. (I can be more specific, but I may add more later so I'm hoping to cover my butt)~​
  • The idea is to basically insert it into a common event, I have id statements to check if the player is moving or has changed direction.​
  • I have a png, it can be named whatever ya need etc~​
  • Ideally, the indicator would show under same level events and over below character events (is that possible even oml what is js).​
​
​
Can you actually explain what it is you want to do? There are several things in that image that could match with your thread title.
Ah, my bad. I actually changed the title 6 times it used to be more specific! xD I shall clarify with "specifically to show the "targeted" tile in front of the player using a png(like a square)."

Too many sim games make it a very common thing for me x0x
Acually you can do this with just event, common event and some variables.
Acually you can do this with just event, common event and some variables.

I was looking into it but then my brain fried haha! So I tried a parellell process when a switch is on:

Code:
var direction = $gamePlayer.direction();
var x = $gameMap.roundXWithDirection($gamePlayer.x, direction);
var y = $gameMap.roundYWithDirection($gamePlayer.y, direction);
[insert show picture at x,y here]

But I am not sure how to make it change when the player changes directions without it being a heavily loaded parallel process always checking and always readjusting even if the player is just chilling there, or if that IS as efficient as it gets. 😩
I can make a demo for you if you want, just using events, variables and common evs.
(I'm not good at JS at all!)
I can make a demo for you if you want, just using events, variables and common evs.
(I'm not good at JS at all!)

Okay SO not going to lie you really got my brain moving. I could use two common events (or just an event/option/etc to do what the first c/e would do, this is most likely).


> One when the option "show indicator" is changed to turn on the switch for commonevent2+spawn in the image, or if it's already on to despawn said image+turn the switch for ce2 off.

> And the ce2 which will move the image if the player moves (that way it will only move the image if the player moves, severely cutting down on the amount of processing this is doing) using some googling for script calls and detective work.
1583949858962.png


----------------------------------------------

HOWEVER, I was hoping to be able to use this with "tap to change direction without moving" because that feels so much nicer to play. I just checked with galvs stationary turn and it doesn't trigger if only the direction is changed. Which brings me to my next question is it possible to do a simple check like above to see if the character has changed direction? 😤 I can't seem to find that via google~
You can check is direction changed via two variables comparision. Just by RM default commands 😉
Yeah I figured, I asked on the questions that don't require thread about there being an even more minimalistic approach since it's a supplementary question. If I get an answer there I can update this before I close it! Thanks for the help!!! ^//v//^ I guess I can also edit the title now so it's easier for people to find this later down the road!

--------------------------------------------------

Edit:
I got the plugin for checking direction made <3 now it will only move the image if the player is moving or changes direction.

HOWEVER, now I've got a new issue, I have no idea how to place the image in front of the player! Looks like I might need that demo/your expertise after all!

I can find plugins/event options to move images based off the corner or the center of the map/screen, but not the player. This would be fine if when the screen stopped moving the tile in-front of player "indicator" didn't stop as well, it gets stuck since the map/screen isn't moving! 😐
Is there a way to bind them to the player pos or use variables to place it? Ideally I'd like to use my variables/a script!

Double edit: Managed it using an event as the "indicator" but an image would be better if not only cuz then I don't have to "move it out of the way" to spawn in say tilled soil. qvq
There, I've made it with picture if you want.

Since you actually found the solution using events, I'm moving this thread in the appropriate section.

I've moved this thread to Moved to RPG Maker MV. Thank you.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/mv-show-indicator-in-front-of-player-for-tools-farming.119033/