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,143
Reaction score
14,205
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,143
Reaction score
14,205
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 Profile Posts

AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!
I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

I've started working on rpg maker again, and I can see a lot of improvement from when I was 13. I still have a long way to go, but I'm proud that I've gotten this far.
Animated Title screen is by SharkerrBlue(SB)
I am using the Nightmare Land pack.
I just can't walk to the store for lunch without walking past people smoking. It not only smells bad, it's probably poisoning me. I'm afraid I'll eventually have to be hospitalized. I can't take another path because there's too much traffic and drivers in the plaza are reckless sometimes. I almost got run over once, even after looking both ways.
RyanYe wrote on whtdragon's profile.
Your art works about Wyrvens and Dragons are sooooooooo cooooooooool~! I like them so bad
Can you create more? like Archangels, Devils, Titans, Cyclops!!

Forum statistics

Threads
108,810
Messages
1,039,644
Members
141,255
Latest member
yam655
Top