Running events in parallel to other draw actions

swquinn

Villager
Member
Joined
Sep 20, 2015
Messages
6
Reaction score
3
Primarily Uses
I was wondering if anyone knew and could provide an example or point me to a resource that shows how to load and run an event parallel to other draw calls.

To give some context as to what I am looking to do, I'm currently playing around with RPG Maker MV's scripting and plugin support while trying to create a credits script. Without getting too much into the details of the script, the idea is that the plugin will read from a data file (e.g. Credits.json) and paint different components on to the canvas at different positions, with fades, etc. (see attachment at end of post).

Right now my intention is to support painting simple text (e.g. labels), images, and ideally to also be able to include events that are run during the credit sequence. I have code that handles the labels and images fairly proficiently, but I'm left scratching my head with how to deal with events.

From looking at the code found in a project, and other plugins, it appears that the following will execute and run a common event:

$gameTemp.reserveCommonEvent(<eventId>); The visual elements of the events are presumably rendered directly to the stage, above all other display components. Ideally I'd like to be able to control what display container an event belongs to, i.e. attaching an event to a specific layer or telling the event to run "underneath" the other rendered content.

The example is a little contrived but for simplicity let's say I have three layers:

  1. Images
  2. Events
  3. Text
I want to render images only to the Images layer, events to the Events layer, and text to the Text layer.

It is easy enough to create a display container for the layers that I'm interested in, using a custom class based on the WindowLayer class (rpg_core.js). This allows me to do something like:

imageLayer = createImageLayer(); // createImageLayer is a custom functionsprite = new Sprite(ImageManager.loadTitle1($dataSystem.title1Name));imageLayer.addChild(sprite);To add images to a layer, and once that layer is attached to a stage it will draw all of the children attached to it. The same recipe can be followed for text.

However, I don't seem to have control over where I can render an event. I'm not sure if it is even possible, but it seems like it should be. It just may not be worth the effort. After all when you boil an event down to its parts its a map with scripted interactions and when a map is displayed the map's name is rendered by default in the top left.

Hmm, maybe I'll start looking there to see how the map name is being rendered.

Thanks for any (and all) help!


credits-example.png
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top