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,777
Reaction score
2,127
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

Who's a fan of firearms? The 5 on the bottom row (not including the green laser ones) I made pretty recently. I plan for most of these to be in my project.

Screenshot 2021-09-28 165924.png
Doing RPG Maker News for 28th September 2021

RMMV - Skip script errors:

For game developer testing purposes.
You know, I really get to farm likes since I post all of @Avery and @hiddenone 's blog tutorials on the forums...
Back from a very long hiatus with a new project woo
This is my battler placeholder image trying out art styles too I want to fake a backview battle system
I think I will want portraits and battle sprites to be 2D and stick to pixel art for overworld not 100%sure but pretty sure its easier to make pixel art for overworld sprites, events and maps and stuff.
Placeholder.png

Forum statistics

Threads
115,441
Messages
1,089,951
Members
150,229
Latest member
Mythphnx
Top