Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Particle Emitter - easy making particle effects in MV!
- Original author: Tsukimi-neko
- Original date: July 15, 2018
- Source thread: https://forums.rpgmakerweb.com/threads/particle-emitter-easy-making-particle-effects-in-mv.97729/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)
Summary
starEmitter x star1 star2 Create an emitter named star#1, config is starEmitter.json, position based on screen. Images are star1.png & star2.png. pausePEmitter {id}
Archived First Post
ParticleEmitter.js v0.1.2
Tsukimi
Last updated: 2018/07/29: add demo sample projectTsukimi
Introduction
PIXI has particles inside but hard to use in RMMV interface.
This plugin provide a simple interface to make particle systems.
Features
- Simple Creating and setting parameters of PIXI.particles.Emitter.
Screenshots
Demo
download my demo project from here!
How to Use
Preparation:
(below are the steps in the video)
1. first,
make your desire particle emitter in the under website, and download the config file(.json).
https://pixijs.io/pixi-particles-editor/
** First scroll down and set Rederer to Canvas2D to see correct visual effects !!
This site use wrong method in WebGL mode. It will auto turn to WebGL mode if your game uses WebGL.
2. create a folder named "particles" inside data/ and put config file inside it
3. create a folder named "particles" inside img/ and put particle image file inside it
4. open plugin manager, turn plugin on and write names of config file (in data/particles/) into it.
The preparation is done.
With only one command(createPEmitter), you can make the emitter show up in the game!
■■■ Create/Adjust emitter by plugin command:
*** You can brief all "PEmitter" to "PE" for short ***
createPEmitter {id} {config} {eventId} {imageNames ...}
create a particle emitter.
id: id of this controller. choose a name you like!
config: config name download from the website (.json no need)
eventId: the event which this emitter chase
-1:player、0:this event、1~:event#
x:no event, on screen;screen:on screen (only on current map)
imageNames: image name inside img/particles/.
ex: createPEmitter star#1 starEmitter x star1 star2
Create an emitter named star#1, config is starEmitter.json,
position based on screen. Images are star1.png & star2.png.
pausePEmitter {id}
pause emitting.
resumePEmitter {id}
resume emitting.
stopPEmitter {id}
stop emitter and delete after all particle i dead.
deletePEmitter {id}
delete emitter and all particles immediately.
setPEmitterPos {id} {x} {y}
set emitter (relative) position to (x,y).
Besides numbers, you can also set these to x & y:
ex: setPEmitterPos star#1 10 x
set emitter star#1's x coordinate to 10. (y doesn't change)
movePEmitterPos {id} {x} {y} {duration} (easingFunction)
move emitter (relative) position to (x,y) by {duration} frame.
input→x: don't move
easingFunction: move easing functions at https://easings.net/
will be 'linear' if not specified
ex: movePEmitterPos star#1 -10 20 60 easeOutBounce
move emitter star#1 to (-10,20) in 60 frames, with
bouncing animation.
setPEmitterZ {id} {z}
set emitter Z layer.
z layer:
0 : lower tile
1 : lower character
3 : character
4 : upper tile
5 : upper character
6 : shadow of airship
7 : Balloon
8 : animation
9 : map destination (white rectangle)
ex: setPEmitterZ star#1 5
set emitter star#1 z-layer to upper character.
setPEmitterAsLocal {id} {true/false}
create particle to event relative position
instead of to the map.
(if true, event move right -> all particle move right)
setPEmitterStaticToPlayer {id} {true/false}
should emitter set to player(-1) remain exist
after map transition.(true -> exist)
*Only effect on emitter set to player.
Advanced moving:
createPEmitter {id} {config} {eventId} {imageNames ...}
create a particle emitter.
id: id of this controller. choose a name you like!
config: config name download from the website (.json no need)
eventId: the event which this emitter chase
-1:player、0:this event、1~:event#
x:no event, on screen;screen:on screen (only on current map)
imageNames: image name inside img/particles/.
ex: createPEmitter star#1 starEmitter x star1 star2
Create an emitter named star#1, config is starEmitter.json,
position based on screen. Images are star1.png & star2.png.
pausePEmitter {id}
pause emitting.
resumePEmitter {id}
resume emitting.
stopPEmitter {id}
stop emitter and delete after all particle i dead.
deletePEmitter {id}
delete emitter and all particles immediately.
setPEmitterPos {id} {x} {y}
set emitter (relative) position to (x,y).
Besides numbers, you can also set these to x & y:
x: Don't change from current parameter value ex:x
v<Number>: value of Game Variable<Number> ex:v15
r<#1>~<#2>: Random value between #1 and #2. ex:r30~45
#1 and #2 can also be variables.
v<Number>: value of Game Variable<Number> ex:v15
r<#1>~<#2>: Random value between #1 and #2. ex:r30~45
#1 and #2 can also be variables.
ex: setPEmitterPos star#1 10 x
set emitter star#1's x coordinate to 10. (y doesn't change)
movePEmitterPos {id} {x} {y} {duration} (easingFunction)
move emitter (relative) position to (x,y) by {duration} frame.
input→x: don't move
easingFunction: move easing functions at https://easings.net/
will be 'linear' if not specified
ex: movePEmitterPos star#1 -10 20 60 easeOutBounce
move emitter star#1 to (-10,20) in 60 frames, with
bouncing animation.
setPEmitterZ {id} {z}
set emitter Z layer.
z layer:
0 : lower tile
1 : lower character
3 : character
4 : upper tile
5 : upper character
6 : shadow of airship
7 : Balloon
8 : animation
9 : map destination (white rectangle)
ex: setPEmitterZ star#1 5
set emitter star#1 z-layer to upper character.
setPEmitterAsLocal {id} {true/false}
create particle to event relative position
instead of to the map.
(if true, event move right -> all particle move right)
setPEmitterStaticToPlayer {id} {true/false}
should emitter set to player(-1) remain exist
after map transition.(true -> exist)
*Only effect on emitter set to player.
Advanced moving:
(Q:Queue、R:Routine)
movePEmitterPosQ {id} {x} {y} {duration} (easingFunction)
Add move command to move queue. Will start next move
after last move is finish.
ex: movePEmitterPosQ star#1 0 20 60 easeOutBounce
movePEmitterPosQ star#1 20 x 30 easeInBounce
Move to (0,20) in 60f then move to (20,20) in 30f.
movePEmitterPosQR {id} {x} {y} {duration} (easingFunction)
Add move command to routine move queue.
will repeat moving command in routine move queue.
ex: movePEmitterPosQR star#1 -20 20 30
movePEmitterPosQR star#1 20 20 30
movePEmitterPosQR star#1 20 -20 30
movePEmitterPosQR star#1 -20 -20 30
(-20,20)→(20,20)→(20,-20)→(-20,-20)→(-20,20)→…
clearPEmitterPosQ {id}
clear move queue.
clearPEmitterPosQR {id}
clear routine move queue.
movePEmitterPosQ {id} {x} {y} {duration} (easingFunction)
Add move command to move queue. Will start next move
after last move is finish.
ex: movePEmitterPosQ star#1 0 20 60 easeOutBounce
movePEmitterPosQ star#1 20 x 30 easeInBounce
Move to (0,20) in 60f then move to (20,20) in 30f.
movePEmitterPosQR {id} {x} {y} {duration} (easingFunction)
Add move command to routine move queue.
will repeat moving command in routine move queue.
ex: movePEmitterPosQR star#1 -20 20 30
movePEmitterPosQR star#1 20 20 30
movePEmitterPosQR star#1 20 -20 30
movePEmitterPosQR star#1 -20 -20 30
(-20,20)→(20,20)→(20,-20)→(-20,-20)→(-20,20)→…
clearPEmitterPosQ {id}
clear move queue.
clearPEmitterPosQR {id}
clear routine move queue.
■■■ Create/Adjust emitter by Map/Event tags(notes):
Map:
<PEmitter:id,config,imageNames,...>
Same as createPEmitter.
However, eventId will be set to screen.
ex:<PEmitter:star#1,starEmitter,star1,star2>
<SetPEmitterPos:id,x,y>
Same as setPEmitterPos.
<SetPEmitterZ:id,z>
Same as setPEmitterZ.
<MovePEmitterPosQR:id,x,y,duration,easingFunc>
Same as movePEmitterPosQR.
event:
<PEmitter:id,config,imageNames,...>
Same as createPEmitter.
However, eventId will be set to this event.
ex:<PEmitter:star#1,starEmitter,star1,star2>
<SetPEmitterPos:id,x,y>
Same as setPEmitterPos.
<SetPEmitterZ:id,z>
Same as setPEmitterZ.
<SetPEmitterAsLocal:id>
Same as setPEmitterPosAsLocal.
<MovePEmitterPosQR:id,x,y,duration,easingFunc>
Same as movePEmitterPosQR.
<PEmitter:id,config,imageNames,...>
Same as createPEmitter.
However, eventId will be set to screen.
ex:<PEmitter:star#1,starEmitter,star1,star2>
<SetPEmitterPos:id,x,y>
Same as setPEmitterPos.
<SetPEmitterZ:id,z>
Same as setPEmitterZ.
<MovePEmitterPosQR:id,x,y,duration,easingFunc>
Same as movePEmitterPosQR.
event:
<PEmitter:id,config,imageNames,...>
Same as createPEmitter.
However, eventId will be set to this event.
ex:<PEmitter:star#1,starEmitter,star1,star2>
<SetPEmitterPos:id,x,y>
Same as setPEmitterPos.
<SetPEmitterZ:id,z>
Same as setPEmitterZ.
<SetPEmitterAsLocal:id>
Same as setPEmitterPosAsLocal.
<MovePEmitterPosQR:id,x,y,duration,easingFunc>
Same as movePEmitterPosQR.
Script Download
You can download(press ctrl+s) the script from here, or from my Github.
FAQ
Q: Error "Cannot set property x of null" show up.
A: please check all names of config-files you use is filled into the plugin parameter "configName".
Q:
A:
Terms of use
Free to use in non-commercial/commercial games. Credits no need. (but I will be happy if you would write in your game!)
Credit and Thanks
- Author: Tsukimi (in this forum: cji3bp62000)
Author's Notes
Library/source used:
- PIXI-particles from:
https://github.com/pixijs/pixi-particles
- Easing function from:
http://gsgd.co.uk/sandbox/jquery/easing/
Features Mentioned
- Simple Creating and setting parameters of PIXI.particles.Emitter.
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
Terms of use Free to use in non-commercial/commercial games. Credits no need. (but I will be happy if you would write in your game!) Credit and Thanks - Author: Tsukimi (in this forum: cji3bp62000)
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...