EasternOceana

Villager
Member
Joined
Jun 3, 2019
Messages
11
Reaction score
4
First Language
English
Primarily Uses
RMMV
I already have the base logic for my command to auto replace actor images at map load IF they are set to be able to run, but it'd be nice to have a plugin command to auto go over every event and re-assign them if either 1 the actor's sprite changed or 2 they were not active until after the map loaded.

I have a basic command made that runs a console.log but it doesn't seem to run at all?
Following is relevant parts snipped out, full file will be attached.
JavaScript:
*@command assignActors
 *@text Assign Actors
 *@desc Update every event to match its actor.
 
//inside the (()=>{ section
     PluginManager.registerCommand(DLemon.AA.pluginName,"assignActors",args=> {
        DLemon.assignActors();
    });
    DLemon.assignActors = function(){
        console.log("it runs");
    }
The command comes up as an option in the plugin command event, but it never seems tor run to begin with. I was using another plugin as reference and I am doing something very specific wrong.
I tried calling console.log next to where the assignActors function gets called, it doesn't run.
I tried putting it ouside the (()=>{ but it gets errors when I do that.
 

Attachments

  • DLemon_AutoActorEventImage.js
    1.4 KB · Views: 7

Mac15001900

JavaScript wild sorcerer
Regular
Joined
Aug 7, 2022
Messages
392
Reaction score
524
First Language
English
Primarily Uses
RMMV
The command comes up as an option in the plugin command event, but it never seems tor run to begin with.
So, just be be clear: how are you using this plugin command in your game?
 

Eliaquim

Hakuen Studio
Regular
Joined
May 22, 2018
Messages
3,362
Reaction score
2,671
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!
The problem is on the plugin name. I have an automatic method for this, so it's been a long time since I used that default method to register a plugin command.

But I believe the plugin name does not have the extension, ".js"
 

EasternOceana

Villager
Member
Joined
Jun 3, 2019
Messages
11
Reaction score
4
First Language
English
Primarily Uses
RMMV
Hi there!
The problem is on the plugin name. I have an automatic method for this, so it's been a long time since I used that default method to register a plugin command.

But I believe the plugin name does not have the extension, ".js"
Oh wow it was this! It immediately works when I remove .js from
JavaScript:
 DLemon.AA.pluginName = "DLemon_AutoActorEventImage.js";
Thanks for pointing that out!
So, just be be clear: how are you using this plugin command in your game?
I was using it like this
1695318587105.png
 

Latest Threads

Latest Posts

Latest Profile Posts

Me working on a deadline, "don't make the baseline and chords too funky, don't over compose it... remember, you have to finish it." Touches MIDI controller...instant funk.
TGA are coming up, and I'm still mad Lies of P didn't get nominated.
Like, they chose a remake of a 20 year old game and a vanilla 2D Mario game over it?

Bah, humbug!
I'll be there for the trailers and whatever weird mistakes are made.
I've bundled all my free plugin releases on itch.io I'll add more later, feel free to check it out! https://starlit.itch.io/rm-free-plugins
If I could draw, my Game Jam title screen would be a Krampus sitting in Santa's chair, his long, blonde hair flowing in the wind, sipping on an Espresso, while snacking on cheddar popcorn, chewing on an orange pencil pensively, while completing a crossword puzzle. I guess it's a good thing I can't draw.
Time for the next chance for y'all to affect my advent calendar! Where should Day 7's sprite come from: land, sea, or demon realm? :rwink:

Forum statistics

Threads
136,782
Messages
1,269,924
Members
180,532
Latest member
jorddy
Top