I'm trying to edit a plugin to recognize what direction characters and events are facing/moving using if/else arguments, but I either get an error saying something like, "this.direction() is not a function" or it doesn't respond to the direction change at all. What can I do?
MZ Help making plugin recognize direction
Javascript/Plugin SupportWhat are you expecting anyone here to answer? You haven't actually provided any code you've written, the plugin you're trying to implement it, or any other info that would be relevant to tell you where you went wrong.
which plugin? and by scriptcall probably:
maybe you need the events ID if called elsewhere (like console log.)
and you may get the direction 2,4,6,8.
if you want names, it needs to be coded in order to grab those or both.
$gameMap.events(this.event).direction().maybe you need the events ID if called elsewhere (like console log.)
and you may get the direction 2,4,6,8.
if you want names, it needs to be coded in order to grab those or both.
This plugin:
RPGMakerMV/HorizontalScrollingMove.js at mz_master · triacontane/RPGMakerMV
RPGツクールMV、MZで動作するプラグインです。. Contribute to triacontane/RPGMakerMV development by creating an account on GitHub.
Specifically this block of code:
I'm trying to get it so that it displays a different character animation when I'm moving up.
"this.direction() is not a function" probably came because you invoked this function on the sprite, but not its character.
this._character.direction() should work.Still can't quite get it to work, but thanks anyway! This is still useful information.
Original thread: https://forums.rpgmakerweb.com/threads/help-making-plugin-recognize-direction.183920/