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

Status
Not open for further replies.

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
164
Reaction score
229
First Language
English
Primarily Uses
RMMV
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:​
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:
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).​
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,160
Reaction score
14,209
First Language
English
Primarily Uses
RMMV
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.
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
164
Reaction score
229
First Language
English
Primarily Uses
RMMV
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
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
516
First Language
Polish
Primarily Uses
RMMV
Acually you can do this with just event, common event and some variables.
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
164
Reaction score
229
First Language
English
Primarily Uses
RMMV
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. :kaodes:
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
516
First Language
Polish
Primarily Uses
RMMV
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!)
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
164
Reaction score
229
First Language
English
Primarily Uses
RMMV
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? :kaopride: I can't seem to find that via google~
 
Last edited:

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
516
First Language
Polish
Primarily Uses
RMMV
You can check is direction changed via two variables comparision. Just by RM default commands ;)
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
164
Reaction score
229
First Language
English
Primarily Uses
RMMV
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! :kaoeh:
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
 
Last edited:

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
516
First Language
Polish
Primarily Uses
RMMV
There, I've made it with picture if you want.

 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,821
Reaction score
4,754
First Language
English
Primarily Uses
RMMZ
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. Please be sure to post your threads in the correct forum next time. Thank you.

 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,821
Reaction score
4,754
First Language
English
Primarily Uses
RMMZ

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.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

unnamed_image.jpg
SOMEONE'S SINGLE! HE DOES LIKE LONG WALKS IN THE IN THE SHADOWS AND THE SMELL OF DECAY. SADLY, HE HAS NO NUMBER TO NOTE OF BECAUSE HE HAS NO USE FOR A PHONE, BECUASE SUMMONING WORKS MUCH BETTER AND DOES NOT COME WITH AN ITEMISED BILL. REMEMBER TO TREAT HIM GOOD ON THE FIRST DATE!
I just found out that MZ regional price on Steam in my place is much cheaper than MV.
Our water started to work again, now i don't have to fill up our toilet with water again.
Finally able to return to work after months of lockdown. My poor feet are hurting :( I need to get used to working again haha

Forum statistics

Threads
108,880
Messages
1,040,255
Members
141,317
Latest member
BuddhaXD
Top