nathanlink169

Veteran
Veteran
Joined
Aug 15, 2013
Messages
76
Reaction score
34
First Language
English
Primarily Uses
RMMV
Hi all,

I have the following bit of code which is present in an Update method for a Window:

JavaScript:
this._currentCharacterData = this._characterQueue.shift();

const x = 40;
const y = 58;

this.drawCharacter(this._currentCharacterData.name, this._currentCharacterData.index, x, y);
this.drawText(this._currentCharacterData.text, x + 32, y - 40, Graphics.boxWidth, "left");

Currently, this draws a characters picture and a piece of text to the screen, which is working quite well. I'm looking to try to make this disappear after a certain amount of time. The timer portion I can do, but the actual "make this appear and disappear" section is the tricky part. So, in all:
  • How would one go about controlling the opacity of texts and images created in this manner?
  • How would one go about telling RPG Maker that they're no longer needed and can be destroyed?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi!
Well, I think if it is inside a window, you can change the opacity of the contents.
this.contentsOpacity or this.contents.opacity, something like that...


For the fade in and out, you can try to check how Game_Screen.prototype does and update the fade and copy the logic to your window too.
 

nathanlink169

Veteran
Veteran
Joined
Aug 15, 2013
Messages
76
Reaction score
34
First Language
English
Primarily Uses
RMMV
Hi!
Well, I think if it is inside a window, you can change the opacity of the contents.
this.contentsOpacity or this.contents.opacity, something like that...


For the fade in and out, you can try to check how Game_Screen.prototype does and update the fade and copy the logic to your window too.
this.contentsOpacity was exactly what I was looking for, thanks for pointing me in the right direction! I am still trying to figure out how to tell RPG Maker that the picture and text are no longer needed and can be destroyed, unfortunately.
 

Latest Threads

Latest Posts

Latest Profile Posts

Sales Goal of Learn RPG Maker MV at 64% now! :kaopride:
When I was in the hospital I did actually have a nurse that was funny, did all these extra nice things for me and said she liked me. So you know what that means. That will be the last time I'll hear from her.
Anyone here ever confronted a never-ending loading screen? Took me 3 hours to realize the problem was the font format :yswt:
Ah, the problems a noob runs into...
WOOHOO!! FIXED A MAJOR SHOP PROBLEM I HAD FOR MONTHS, WHAT A WAY TO END MY STAY-CATION!

Forum statistics

Threads
118,800
Messages
1,118,794
Members
155,979
Latest member
besher
Top