Fenix2222

Villager
Member
Joined
Jul 15, 2021
Messages
10
Reaction score
0
First Language
Italian
Primarily Uses
RMMZ
I'm trying to show an image for one second but it doesn't work.

JavaScript:
$gameScreen.showPicture(1, "Bagee's sword", 1, 800, 500, 80, 80, 255, 0);
this.wait(60);
$gameScreen.erasePicture(1)

Am I doing something wrong?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,764
Reaction score
2,110
First Language
EN
Primarily Uses
RMMZ
This example can be done in an event without scripting, using the Show Picture, Wait, and Erase Picture commands. That might not apply for your situation, but I thought I'd mention it~

In a Script command in an event, this refers to the Game_Interpreter that is processing the event. this.wait sets that interpreter's wait counter. But the interpreter only checks its wait time between event commands. You can split the erasePicture call into a separate Script command, e.g.

◆Script:$gameScreen.showPicture(1, "Bagee's sword", 1, 800, 500, 80, 80, 255, 0); : :this.wait(60); ◆Script:$gameScreen.erasePicture(1);

If you are trying to do this in a different context (e.g. part of a plugin?) then you will need to give more details. For example, this is a keyword that refers to the current context: this.wait generally will not exist. If you want the interpreter to handle things in that situation then you'd also need to create appropriate event command objects and pass them to the appropriate interpreter, instead of simply calling functions.
 

Latest Threads

Latest Profile Posts

Don't you just hate it when you get a high level armor only for it to look like a metal plated bikini on your female character?? Seriously. How can that protect you??? Enemies can hit the squishy parts! :kaosigh:
Bathrooms are not designed for the middle of the night.
so... I decided since a park was an area in my game... here's an enemy that's slide with a hand behind it. cause why not.

Forum statistics

Threads
115,278
Messages
1,088,562
Members
149,890
Latest member
mekiboss
Top