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,753
Reaction score
2,104
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

I THINK I have a slightly better grasp on drawing my maps now... sorta. I still need to figure out how to draw a city of sorts. I've only got the abstract going so far.
One day, I'll not have this lingering cough and we'll have another make a game stream.
A music I create while practicing E Major scale. :D
Too bad the Boss Battle Build Bout isn't also for VXAce.

Forum statistics

Threads
115,178
Messages
1,087,884
Members
149,745
Latest member
leilahbrekke
Top