RMMV Using script commands for MOG_CharacterMotion

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
163
Reaction score
71
First Language
English
Primarily Uses
RMMV
I'm using MogHunter's Character Motion plugin, which uses comment tags for some things and plugin commands for other things. One effect it has is event rotation, but the only way to use it is to use the plugin command:

rotation_event_id : ID : ROTATION_VALUE

where "ID" is the ID of the event you want to rotate. If it were a script command I could use this._eventId for the event itself, but of course I can't with plugin commands. I'm having the events randomly spawned in, so I don't know what their ID numbers will be. I was wondering if anyone could see a way to use a script call to do this?

EDIT:
By the way, the plugin's instructions are in Portuguese, here they are translated into English:

+++ MOG - Character Motion (v1.3) +++
By Moghunter
=============================================================================
Character sprite animation system.
=============================================================================
USE
=============================================================================

To activate the effects in events, just use this comment.

Breath Mode : X (1..3)
Float Mode
Swing Mode
Ghost Mode : X *(1..2)

=============================================================================
COMMANDS PLUGIN
=============================================================================

Use the codes below to activate the effects on characters.
If you set the ID to 0 it means that the effect will be activated on the main player.
main.
Note - The effects are based on the IDs of the characters and not the actors.

breath_mode_follower_id : ID : EFFECT (1..3)
ghost_mode_follower_id : ID : EFFECT (1..2)
float_mode_follower_id : ID
swing_mode_follower_id : ID
shake_effects_follower_id : ID : DURATION
collapse_effect_follower_id : ID : EFFECT (1..3)
rotation_follower_id : ID : ROTATION_VALUE
zoom_follower_id : ID : ZOOM_VALUE
clear_effects_follower_id : ID

=============================================================================
To activate the effects on events use the codes below.

breath_mode_event_id : ID : EFFECT (1..3)
ghost_mode_event_id : ID : EFFECT (1..2)
float_mode_event_id : ID
swing_mode_event_id : ID
shake_effects_event_id : ID : DURATION
collapse_effect_event_id : ID : EFFECT (1..3)
rotation_event_id : ID : ROTATION_VALUE
zoom_event_id : ID : ZOOM_VALUE
clear_effects_event_id : ID

=============================================================================
Examples.
=============================================================================

breath_mode_event_id : 15 : 2
float_mode_event_id : 15
ghost_mode_follower_id : 0 : 1
zoom_follower_id : 1 : 2.5

=============================================================================
HISTORY
=============================================================================

(v1.3) - New features for the Chrono Engine
(v1.2) - Chrono Engine compatibility

(v1.1) - Changed notetag to standardize the form of commands
 

SundialShark

To Idyllic Times
Member
Joined
Nov 9, 2020
Messages
4
Reaction score
16
First Language
English
Primarily Uses
RMMV
You can simply call plugin commands within scripts via use of Interpreter.

For example, for Mog's shatter plugin, I don't know the ID of the thing that's gonna explode, so I use:

var Enemy_Explode = new Game_Interpreter(); Enemy_Explode.pluginCommand('shatter_event_id', [EvId, 1, 1, 1]); You can do this with virtually any kind of Plugin Command!
 

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
163
Reaction score
71
First Language
English
Primarily Uses
RMMV
@SundialShark
Thanks, but I couldn't get it to work, so to test your exact code I installed Mog's shatter plugin. It works as expected using plugin commands, but using your code above didn't do anything at first. I assumed "EvId" should be replaced with the number of the event (or this._eventId), but that doesn't seem to be the case either, it appears to be the second argument. Anyway, when I use:

Code:
var Enemy_Explode = new Game_Interpreter();
Enemy_Explode.pluginCommand('shatter_event_id', [1, this._eventId, 1, 1]);

it makes the current event disappear (and replacing "this._eventId" with "3" would make event #3 disappear, etc.), but there's no cool shatter effect.

For Mog's Character Motion plugin, the rotation effect only has two arguments (character ID and mode), so I used:

Code:
var Rotate_It = new Game_Interpreter();
Rotate_It.pluginCommand('rotation_event_id', 1, 1]);

which I assumed would affect event #1, but nothing happens at all. This is with every other plugin turned off.
 

SundialShark

To Idyllic Times
Member
Joined
Nov 9, 2020
Messages
4
Reaction score
16
First Language
English
Primarily Uses
RMMV
You're missing a [ in the argument list--and--wait a second! Hrm. You, know, on second thought, this makes me wonder if... Oh!!! Moghunter likes to count ":" as a parameter too. Sorry, I completely forgot.

I just tested it out, what you wanted is:

var Rotate_It = new Game_Interpreter(); Rotate_It.pluginCommand('rotation_event_id', [":", 1, ":", 1]);

That should do! Sorry for not doing this to begin with. Good luck with the rest of your game making!
 

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
77
Reaction score
11
First Language
English
Primarily Uses
RMMV
You're missing a [ in the argument list--and--wait a second! Hrm. You, know, on second thought, this makes me wonder if... Oh!!! Moghunter likes to count ":" as a parameter too. Sorry, I completely forgot.

I just tested it out, what you wanted is:

var Rotate_It = new Game_Interpreter(); Rotate_It.pluginCommand('rotation_event_id', [":", 1, ":", 1]);

That should do! Sorry for not doing this to begin with. Good luck with the rest of your game making!
You have helped me too
you so great!!
 

Latest Threads

Latest Posts

Latest Profile Posts

Finally started working on Grim Trigger episode 2 today :LZScat: it's half comic/half visual novel!

GfY3Rwj.png
Is it interesting to get more backstory on villains? A key moment in their past, their childhood, or maybe something that shows they've always been that way? To see or not to see?
"Everything tastes like chicken until it's chicken, then it doesn't taste like chicken."
Context: chicken samosas do not taste like chicken. I thought it was veggie samosas.
Just another ordinary evening.
This pig girl is a merchant and playable character.
Currently there's no name for her yet. a suggestion is welcomed.
Merchant.jpg
Merchant-1.jpg
Want for a Nail: I'm trying to figure out what controllers work with MZ, one support thread, a plugin request thread, a dead controller, and a $48 eBay purchase, and a PS1/PS2 USB adapter later. Still stuck with keyboard controls...

Forum statistics

Threads
110,353
Messages
1,052,583
Members
143,394
Latest member
flopinou74
Top