Attach this script as an 'OnDeath' script to a bashable placeable.
Set a string variable called 'Item' on the placeable, and give it the template of the broken version of the placeable.
When you kill the placeable, it will be replaced with a broken version rather than just disappearing.
Setting an integer variable called 'Material' on the bashable placeable will change the sound it makes (0=wood, 1=stone, 2=cloth, 3=glass). The default is wood.
The example module shows some of the placeables that also have broken versions. The replacement placeable will be static and non-clip, so make sure you place a walk mesh cutter around the bashable item (unless you
want to be able to walk through it). You could also replace objects with generic piles of broken stone/wood/litter instead of broken versions of a specific model.
Updated to v1.01. It now plays breakage sounds, depending on the 'Material' integer set on the bashable placeable (defaults to wood if 'Material' is not set).
You must be Logged In to post comments in this section.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone