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
523
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,361
Reaction score
2,669
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

If you need some maps done, but don't like mapping or just want to focus on other areas of your gamedev, my workshop is alway open! Hit me up!
Someone leaked the GTA VI trailer, so Rockstar just put it out today. Let the hype period truly begin!!!
Not surprising, but I've basically forgotten everything about Cubase. Guess I'm looking up beginner's tutorials again... :kaodes:
Bought myself a single booster of Revised edition MtG and it was not a winner. RIP.
Surprising to come back and my last profile post still resonates years later... Air is still dry. Hello again forum!

Forum statistics

Threads
136,750
Messages
1,269,520
Members
180,490
Latest member
Blackboxer
Top