AnniexoHoshi

Villager
Member
Joined
Jun 30, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
Is there a way for people to still move around with mouse click with this? I've just downloaded it, but still want to use mouse click to move around.
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
998
Reaction score
864
First Language
English
Primarily Uses
N/A
@AnniexoHoshi Yes. Just like with keyboard input, if you hold down your left mouse key for a wait count number of frames, the player will be able to move via mouse input.
 

AnniexoHoshi

Villager
Member
Joined
Jun 30, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
@AnniexoHoshi Yes. Just like with keyboard input, if you hold down your left mouse key for a wait count number of frames, the player will be able to move via mouse input.
Thank you, but is there a way for the player to be able to let go of the mouse button and the character still move to where the click was?
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
998
Reaction score
864
First Language
English
Primarily Uses
N/A
@AnniexoHoshi MV should do that automatically. None of that is explicitly coded into this very short plugin.
 

AnniexoHoshi

Villager
Member
Joined
Jun 30, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
@mjshi I think you might have done something by mistake and not realised it. For me, I have to hold down the mouse button to where I want the character to go. If I let go they stop in their place. If you could, is there a way you can make it so double clicking makes the character more?
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
998
Reaction score
864
First Language
English
Primarily Uses
N/A
@AnniexoHoshi This isn't an official release but I spent the last hour on this and there's still a couple bugs I haven't ironed out, but it should function for large movements. Yes, I'm aware that occasionally you'll get stuck behind a wall and will have to hold down for finer movements. Also, if you click somewhere else while in the middle of a move route yes the player will stop moving. I'm aware of those two behaviors. The first is unintentional and a bug, the second is intentional but might be mistaken for a bug.

How I've gotten it to work with double clicks is this-- MV remembers the tile you last clicked on and if you click on that tile again it will autopath to there. Obviously this method is imperfect and for some reason is messing with the way MV handles autopathing by default. I'm not really sure why.

I still recommend the officially supported way of movement over this. MV doesn't support double clicking, unfortunately u.u
This is the best I can do to emulate that behavior. I probably won't be posting any updates or fixes to this double clicking version past the one posted here.
 

Attachments

  • TurnInPlace.js
    2.9 KB · Views: 13

ldd

Villager
Member
Joined
Feb 19, 2016
Messages
16
Reaction score
13
Primarily Uses
shorter (and cleaner) way to accomplish this is fewer lines (without the plugin)

Code:
// player can turn in place
Game_Player.prototype.executeMove  = function(direction){
   if(Input.isLongPressed(Input._latestButton)  || $gameTemp.isDestinationValid()){
       this.moveStraight(direction);
   }
   else{
    this._direction = (direction);
    }
}
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
998
Reaction score
864
First Language
English
Primarily Uses
N/A
@KitteyWolf Have you tried switching the order of the plugins? His camera control plugin overwrites something completely, so Turn In Place needs to be below it.
 

KitteyWolf

FriendlyFur
Veteran
Joined
Sep 2, 2016
Messages
48
Reaction score
7
First Language
English
Primarily Uses
RMMV
@mjshi i did! it was just not working-
though i ended up using a different plugin for both the camera and turning in place
[i still like yours, but another one is made by a person i'm already using plugins by and it cleans up my credit page nicely]
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
998
Reaction score
864
First Language
English
Primarily Uses
N/A
@KitteyWolf
Strange, works for me when I put Turn In Place under camera control. Might be another plugin in there causing the issue, or something else entirely.

n0y7dWN.gif

But either way, I'm glad you were able to find another option ^^
 

8ik9ol

Villager
Member
Joined
Aug 16, 2019
Messages
5
Reaction score
1
First Language
German
Primarily Uses
RMMV
I'm using




I find it a shame that I can't use these two scripts simultaneously, as my game needs diagonal movement, but I'd love to have turning in place.
I think I found a solution to your problem, (which had also become mine):
In rpg_sprites.js replace line 322 with:

Sprite_Character.prototype.characterPatternY = function() {
return (((this._character.direction() == 1) ? 2 : ((this._character.direction() == 7) ? 4 : ((this._character.direction() == 9) ? 8 : ((this._character.direction() == 3) ? 6 : (this._character.direction())))))- 2) / 2;
};

This works fine for me. I hope it can help you, too.
 

Ascare

Villager
Member
Joined
Dec 14, 2017
Messages
9
Reaction score
5
First Language
German
Primarily Uses
RMMV
I think I found a solution to your problem, (which had also become mine):
In rpg_sprites.js replace line 322 with:

Sprite_Character.prototype.characterPatternY = function() {
return (((this._character.direction() == 1) ? 2 : ((this._character.direction() == 7) ? 4 : ((this._character.direction() == 9) ? 8 : ((this._character.direction() == 3) ? 6 : (this._character.direction())))))- 2) / 2;
};

This works fine for me. I hope it can help you, too.
Thanks! I use 8 frames per character and diagonal movement (GALVs scripts) and your fix did it for me.

And thanks to mjshi for this plugin. I use this in combination with Talk to Follower and it works fine. :cool:
 

Phantasmagoric

Villager
Member
Joined
Nov 2, 2020
Messages
10
Reaction score
3
First Language
Portuguese BR
Primarily Uses
RMMV
Hello, sorry if I'm kinda late, but I've been suffering from an issue when using your plugin. When using move route commands, the game doesn't do it automatically, I have to hold any directional key for the character to move the way I defined.
I've tested without any other plugin and the issue persists even with only your plugin.
I don't even know if it's intentional, and I'd like to know if I can do something about it.
Thank you.
 

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
41
Reaction score
19
First Language
English
Primarily Uses
RMMV
Hello, sorry if I'm kinda late, but I've been suffering from an issue when using your plugin. When using move route commands, the game doesn't do it automatically, I have to hold any directional key for the character to move the way I defined.
I've tested without any other plugin and the issue persists even with only your plugin.
I don't even know if it's intentional, and I'd like to know if I can do something about it.
Thank you.
I've also noticed with this plugin that the "wait" command for the player gets completely ignored in move routes. Really frustrating because this is a really really useful plugin to have otherwise.
 

Phantasmagoric

Villager
Member
Joined
Nov 2, 2020
Messages
10
Reaction score
3
First Language
Portuguese BR
Primarily Uses
RMMV

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
1,207
Reaction score
820
First Language
Polish
Primarily Uses
RMMZ
Hello @mjshi, I like your script, but there is one problem I think. When I turn on your plugin, animation is super-fast. I mean stepping animation of character/player.

Edit: got the actual version from github and it works fine, so I think link in the first post leads to the old version.
 
Last edited:

serp

Villager
Member
Joined
Nov 17, 2015
Messages
14
Reaction score
4
First Language
English
Primarily Uses
*siiiiiiiiiigh* of course I notice there's a page 2 to the comments after debugging and fixing an issue on my own.

FYI @mjshi, I hit the same issue as @fizzly, and yes, version v1.0a does fix it (not the version currently linked in the original post). In my case I fixed it by using my own variable to track the move wait instead of using the existing ._waitCount variable attached to the object, but it seems your fix is to simply early return any time the event is actively running (and not mess with _waitCount), which makes perfect sense!

Anyway, thanks for making this script!
 

Latest Threads

Latest Profile Posts

I am currently looking at a screen. Such a joyful occasion!
Whelp. I just burned my fingertips on playdough and gave myself blisters. Didn't realize that was possible but apparently that is a thing when making homemade playdough.
This semester I will teach and grade students at my university and the closer it comes the more nervous I become.
I don't know if having events (with comment) auto-erase themselves actually helps frame-rate.
How long does it take to get a classifieds thread approved?

Forum statistics

Threads
125,584
Messages
1,172,038
Members
164,669
Latest member
chucknz
Top