Destructor
Welcome to the Destructor package guide.
What is Destructor?
Destructor is a tool that provides enhanced wall damage in Crayta. It combines the Crayta build-in HitResult, particle systems and voxelgrid. But why read about what visual effect it produces if you can see a demonstration right here:
[Destructor package on Youtube]
What’s included in the package?
In the package you will find:
- 4 x “Destructor” templates
- 2 x “Example Destructor Wall”
- 4 x “___Destructor Debris” templates
- A set of voxel meshes for each of these templates
- DestructorScript
- EffectManagerScript
- PhysXScript
- Documentation
How to use
After downloading the package, Destructor comes ready-made. This means you should be able to use the “Destructor” template right away. In this guide I explain this set-up, more details and other custom set-ups are explained in the Destructor documentation (also included in the package). For now, to use Destructor follow these steps:
- Pick a “Destructor” template, presets for Red Brick, Grey Brick, Wood and a custom style are included to choose from. Add the template to your hotbar.
- Add the template to your voxel mesh by clicking on it with the template selected.
-
Open the Entities World-tree and click on the “DestructorSettings” script folder. Here you see the configuration of Destructor on your voxel mesh.
-
Here you see the DestructorScript with it’s properties. As you can see there is no entity selected for the field Damage Entity yet. For Destructor to work, you have to set this part up.
- Drag your voxel mesh (orange colored in the screenshot above) into the Damage Entity field. Now Destructor knows which wall to work with.
Also, the Radius property lets you adjust the size of the crater that you leave behind. Default is 75, meaning 75 cm diameter hole in your voxel surface. Destructor varies the crater size between this number and randomly + 25 cm more for variety in craters.
- Now select your voxel mesh and check the box for “Damage Enabled”. An “On Damage” event becomes available. Drag the DestructorSettings script folder onto the +.
- Where it says ‘Unset Binding’ simply select the “OnDamage()” Event of the DestructorScript. Once you have done this, the set-up is complete.
Now get to Destructor’ing!
Start the game preview and use any method to inflict damage on the voxelmesh to create the high impact destruction effects. Have fun!
That was all. If you encounter any questions or have other comments or questions, feel free to post in this topic, I’ll do my best to help out. But also if you have technical suggestions, improvements, share them here to make Destructor better
#Currently in development
- Entity pooling
- More variation in effects
- Mesh debris
- Auto mesh fracturing
# Honorable mentions and packages used:
- Entity Reset package (which I used to make the PhysXScript)
- Simple Sign package (used for package instructions)
- the Feedback Friday gang for their feedback and testing
- Crayta tutorials