Here is a similar question that @caethyril gave a great response to:
But, it requires coding, sooo might be useful if you rule out all other options.
Let's say my NPCs are an array of objects. This way I create a living world: when the player enters a map, the game checks which NPCs are currently in that map and spawns character-events to illustrate these NPCs.
But, the real data for all NPCs, including those that are active off the map, is...
Looks like you have a solid programming background, so RPGM's JS is all about figuring out patterns and best practices to minimize eventual maintenance.
Q: Or is it to create a new property called .glb under the window object and give it an empty object?
A: Yes. You basically allocate a...
Using RPGM's variables inside script calls might become burdensome maintenance-wise.
For example, if you change the red tint color from variable 213 to 1001 then you have to change every single script where that variable is mentioned. But there is a better way.
First, you run an...
That "1" that you have in the very end is the duration parameter.
The function goes like this:
let rgbg = [200,0,0,0]
let duration = 300 // the tint will take 300 frames to set in
Turns out the plugin code I was studying had errors in how plugins clone event id.
The original sprite creation method works fine once I eliminated the ID errors.
Sorry, turns out the error was elsewhere.
@Synrec indeed, I did create the copy of the event -- it works, blocks the way, and talks like the original event.
Still, I might be getting closer.
I.e. the following changes the image on the original character, but for some reason the cloned event is still elusively giving all kinds of...
@ATT_Turan, I hope to make a sandbox game, with sayyy 500 NPCs commuting between multiple maps preserving their stats, names, etc.
This is very easy to accomplish using JS backend with a mere array of NPC objects. But for me such task is absolutely impossible using the built-in editor.
@ATT_Turan indeed, my proof is console showing the $dataMap is already initialized -- per screenshot. You can even see the event queue there, the length of which I am requesting.
And yet, when I am referring to $dataMap right after I call "console.log(top)" I get a null.
Absolutely beyond my...
@r66r thank you, but it is a bit different.
So, $dataMap is what the world is, and $gameMap is how $dataMap changes during the gameplay.
I need events from $dataMap, but the whole thing is strangely null.
I am trying to see how many events I have from inside a plugin. Yet, the code errors out saying I am accessing a null.
However when I ran a console and examine $dataMap (via console.log(top)) it clearly shows that this object is not null.
Big Google Warning Today for chrome users - apparently some kind of security threat has happened and everyone is being advised to update their Chrome browser ASAP by going to settings and/or "About Google Chrome", to update their browser version to a new one just released.