epson777341

Veteran
Veteran
Joined
Oct 10, 2014
Messages
34
Reaction score
2
First Language
English
Primarily Uses
Hi there!


So, I'm trying to call a plugin command using the VPS Dynamic Weather System and YEP - States and Buffs Core.


Basically I'm trying to make weather effects end when certain buffs do.


I'm mostly just trying to call this command:


stopWeather


into this spot:


<Custom Leave Effect>

</Custom Leave Effect>


I do see that I need to use this:


var aliasPluginCommand = Game_Interpreter.prototype.pluginCommand;

Game_Interpreter.prototype.pluginCommand = function(command, args) {
aliasPluginCommand.call(this, command, args);
if (command === 'plugincommandtextname') {
dostuff(args);
}
};


But, I'm just having a little trouble putting it all together. Would anybody be able to help me out? Thanks in advance.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,215
Reaction score
14,248
First Language
English
Primarily Uses
RMMV
plugin commands run from the Plugin event command, not from noteboxes.  The only way you're going to get that to work is if the plugin that reads those notes has something set up to do it.


Links to the plugins you're using would be the first step in getting help.
 

epson777341

Veteran
Veteran
Joined
Oct 10, 2014
Messages
34
Reaction score
2
First Language
English
Primarily Uses
Oh, I see now. I get it. I was looking at script calls and thought they could be used in noteboxes. Thanks for pointing that out. I feel dumb. My bad.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
Actually, I believe in this instance you can use a script call within the notetag. The help text for the plugin does state that any code within the two tags should be executed ... so, the following may work :

Code:
// $gameMap._interpreter.pluginCommand('nameOfCommand', [arg1, arg2, ...]);

$gameMap._interpreter.pluginCommand('stopWeather', []);
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,215
Reaction score
14,248
First Language
English
Primarily Uses
RMMV
that's why I asked for links to the plugins.  Nice :)


Although - is this something you want to happen on the map or in battle?  I think the map and battles use different interpreters, so your script call might be different depending on where/when it's being used.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
857
First Language
English
Primarily Uses
RMMV
Yeah, that is true. If $gameMap does not work, then perhaps give $gameTroop a try. I really do not tinker around with the battle system very much.

Code:
$gameTroop._interpreter.pluginCommand('stopWeather', []);
 
Last edited by a moderator:

epson777341

Veteran
Veteran
Joined
Oct 10, 2014
Messages
34
Reaction score
2
First Language
English
Primarily Uses
Wow, that worked. Sorry for late reply. 


It does stop the weather effect, now I just gotta make it re-tint the screen, but I should be able to get that one on my own. 


Thanks a lot!
 

Latest Threads

Latest Posts

Latest Profile Posts

Today is the day! I will be productive in game dev work! I will - *gets distracted by cat playing with her toy mouse* Awww <3
Whelp. I tried to be productive.
Decided to work on Fandom Scouts today. I've decided that instead of using the generic "scrolling text" event that MV has (I'm using MV for FS, not MZ) I'll use the movie option. I'm still trying to find a way to get Premiere Pro to output the compatible format though. If anyone can give me some help, it would be greatly appreciated!
Barthdry wrote on tln143's profile.
Hello tln143 Welcome to the RPG Maker Forum. We wish you enjoy and make good rpg games
Barthdry wrote on 00cassiesmells's profile.
Hello 00casiemells Welcome to the RPG Maker Forum. We wish you enjoy and make good rpg games
Remember guys: Drink water and workout is important too! Don't stay too much time on the PC working! :D

Forum statistics

Threads
109,036
Messages
1,041,513
Members
141,522
Latest member
Corporal_Siva
Top