Hi! I have made a simple Confetti Effect script (first script, with the help of ChatGPT ) and after some struggling it works. I would like to share it with you. Maybe it can help someone...
// ==Plugin==
// @name confetti
// @desc A plugin to add colorful confetti effect to the game.
// ==/Plugin==
(function() {
var confettiEnabled = false;
var confettiContainer = null;
var shouldStopConfetti = false; // New variable
var _Scene_Map_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function() {
_Scene_Map_start.call(this);
if (confettiEnabled && !shouldStopConfetti) { // Check shouldStopConfetti
this.startConfettiEffect();
}
};
var _Scene_Map_terminate = Scene_Map.prototype.terminate;
Scene_Map.prototype.terminate = function() {
_Scene_Map_terminate.call(this);
shouldStopConfetti = true; // Set to true when scene terminates
Usage:
To activate script you use SCRIPT command on an event and paste this code:
SceneManager._scene.startConfettiEffect();
If you call the event multiple times... more confetti. Pretty simple.
The effect is auto-disables when you leave the map
You need to have images for the confetti on your /img/pictures/ folder. Their name should be confetti.png, confetti2.png, and confetti3.png. You can change this or add more images or whatever editing this line of the script:
var confettiImages = ['confetti', 'confetti2', 'confetti3'];
I used these three images, you can use them, or edit them or whatever you want. Same with the code. Use it, edit it, improve it, I dont really care.