The Custom Explosion module does exactly what the name would suggest: it allows you to easily make custom explosion effects that act like normal explosions. Getting started requires very little scripting experience, but advanced users can still create more advanced explosion effects and behaviors.
- Create custom explosion effect templates without writing a single line of code
- Detect hits and destroy the environment just like regular Explosion instances
- Define custom behaviors for effects
Every custom explosion object created using this module is based on an explosion template. A template is essentially a folder containing the required effects such as Particle Emitters, Lights and Sounds. Creating templates does not necessarily require any scripting knowledge.
To create an explosion template, follow the steps below:
- Create a new Folder inside the Templates folder.
- Give the new Folder a unique name.
- Insert the effects (Particle Emitters, Lights etc.) to the new Folder.
To create a basic explosion, the following steps are required:
- Require the CustomExplosion module from a script.
- Create a new Explosion with CustomExplosion.new(“Your template name here”)
- Set the Explosion’s position with Explosion:SetPosition()
- Set the Explosion’s parent to workspace with Explosion:SetParent(workspace)
For more advanced behaviors such as sound effects before the explosion happens and hit detection, refer to the documentation bundled with the module.
An example of what the module can achieve.