peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
540
Reaction score
326
First Language
Portuguese(BR)
Primarily Uses
RMMV
I'm using the following code to draw text above some events, and update its position according to the event's position:

Code:
$gameMap.event(this._eventId).bitmap = new Bitmap(120, 40);
$gameMap.event(this._eventId).bitmap.outlineWidth = 2;
$gameMap.event(this._eventId).bitmap.fontSize=14;
$gameMap.event(this._eventId).bitmap.drawText($gameMap.event(this._eventId).mynameis,0,0,120,40,"center");$gameMap.event(this._eventId).sprite = new Sprite($gameMap.event(this._eventId).bitmap);$gameMap.event(this._eventId).sprite.z=20;
$gameMap.event(this._eventId).sprite.setFrame(0,0,Graphics.boxWidth, Graphics.boxHeight);
SceneManager._scene.addChild($gameMap.event(this._eventId).sprite);

setInterval(()=>{$gameMap.event(this._eventId).sprite.x=$gameMap.event(this._eventId).screenX() - 60;$gameMap.event(this._eventId).sprite.y=$gameMap.event(this._eventId).screenY() - 80},16)

it works fine, but whenever I perform a $gamePlayer.reserveTransfer (its to the same map) the text gets deleted. Does someone know why?

I noticed that using the reserveTransfer makes the FPS drop. That + the deletion of my bitmap makes me think this function is re-rendering the whole map/events when I run it(even when its a transfer to the same map), but I'm not 100% sure.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

hmmm. an art of mine was removed from reddit, for a reason not even listed.
Going to try my luck with Rust programming language. C++ is just way too gosh darn frustrating.

Forum statistics

Threads
121,887
Messages
1,144,917
Members
160,140
Latest member
LagusaDumDum
Top