-
Notifications
You must be signed in to change notification settings - Fork 3
22 Dude Death
Russ Painter edited this page Apr 6, 2019
·
4 revisions
Sadly, they have to face danger.
This will just be a simple bloody explosion that destroys itself when it completes.
- Create an Empty in the Game Scene Heirarchy and call it DudeDeath
- Drag this to the Prefabs folder, and delete it from the heirarchy
- Open the prefab editor for the DudeDeath
- Add an empty inside this prefab and call it Blood. Set it's position to X:0, Y: 1, Z:0 so that it explodes from the middle of the dude
- Add a Particle System to the Blood object
- Set the Stop Action to Destroy so that when the explosion finishes, the explosion prefab instance goes away
- Play around with the particle system values. But this is what I'm going to try:
- Duration: 1
- Start Lifetime: 1
- Shape: Sphere
- Rate Over Time: 100
- Material: Particle default
- Start Color: Red
- Open the Dude prefab and add a Die script.
- Set the Chunks Prefab to our DudeDeath prefab
- Add a Box Collider component to the dude, so that the raycast can see him
- Position/Size the green collider box so that it just fits our guy. It's best to do this in ISO view mode looking straight on from the various directions rather than trying to do it in a 3D perspective view.
I'll look the other way and trust you aren't going to intentionally shoot some of your dudes now.
Add a sound to the DudeDeath prefab. A squish or a scream might work.
If you want it to be really gross, you could do the same as we did with the ship and ufo models: Create another model of the dude with separate meshes for his different parts. You could then add a UfoExplode script (or a similar one for the dude) to make the bits go flying.
