Destructibles

Post Reply

0
No votes
 
Total votes: 0

User avatar
=(V)=RocketJedi
Lieutenant Colonel
Posts: 11559
Joined: Fri Oct 11, 2013 8:41 pm
Location: New York
Has thanked: 72 times
Been thanked: 17 times
Contact:

Destructibles

Post by =(V)=RocketJedi »

http://www.ut99.org/viewtopic.php?f=5&t=4877
Destructibles- a simple way to make breakable stuff for your maps

Please take the time and read the instructions. There is a small learning curve but once you sort that out then the making and placing of destructibles will be quick and easy.

Installation: If you need help with this part then delete the mod and go back to Halo. Seriously.


Overview:
Destructibles have three classes- DestructibleGlass, DestructibleWood, and DestructibleStone. Choose the one closest to the material you are working with as the effects are tailored to each one.

To create:
With your map open, select the actor class browser and open the Destructibles.u package. Now, take your chosen BSP you want to make the destructible from and put your builder brush around it just like you are making a normal mover. Intersect the BSP and then right-click the "create a mover" button. You'll see three new mover classes. Select the one that is your material and the editor will make you a mover. Now place that mover where you want the destructible placed. It's almost ready for use once we adjust the properties.

Open the defaultproperties for your new Destructible mover. You will find these new settings:
ExplosionDimensions=
ChunkSize=
ChunkNumber=
ChunkTexture=
BreakingSound=

Let's do a quick rundown of these settings...

First, ExplosionDimensions sets the radius around the mover's center where the chunks will spawn. A higher number means the chunks spawn farther away. Small models will need 30-50 and larger models may need 100 or more. Experiment to see visually what looks the best given your chosen thing.
Next is ChunkSize. This is the size of the created chunks. 1 is default, 2.5 or 3 is pretty large and .25 is pretty small. Again, just test and see what works.
ChunkNumber is the number of created chunks when the object is destroyed. Don't overdo this number, try to be realistic. 3 or 4 usually works for stone, a few more for wood, and glass needs the most.
ChunkTexture is the texture the chunks will have. Does NOT need to be the same as the object being destroyed.
BreakingSound is the sound emitted from the Destructible when it breaks apart.
Lastly, there is a default setting in mover called "DamageThreshold". Don't forget to set this to whatever damage you want your object to take before it breaks apart. Consider this the 'health' setting for your Destructible.

You can see that we tried to make this mod scale from small objects to large ones by adjusting these settings. Overall it gives a good effect suite with very low overhead and minimal stress on the client and almost none on the server.

A few things to keep in mind:

Don't let your Destructible touch anything when it is placed. Because these are subclassed from mover they carry some of the weirdness too. Just give it a single unit of space and things will be fine. If you don't then the Destructible can get buggy and not work right. You were warned if you ignore this.
Also don't forget to set KeyFrame1 and move the Destructible to somewhere in the void that is outside your map. This will give the Destructible a place to go when it is triggered so that it appears it was destroyed to the player. We need to keep the mover and not destroy it since UT really doesn't like it if that happens so placing it's KeyFrame into the void accomplishes all that.

As always, improve this code if you want. Source was included so have at things. This works well for what we wanted and should fit a pretty big variety of sitations but develop on with it if you need something more particular.

Good luck!

papercoffee & gopostal
Image

Image

=(V)=BloodyRabbit wrote: Tue Oct 10, 2017 3:13 pm That was EPIC! I just creamed all over my panties!!!
Post Reply

Return to “Mods, Coding & Programs”