x


Makeing something Blow-up

Hello, I have a enemy "Mine" type character, Could someone be kind enought to send me a script to "Kill" or Blow it up as soon as it colides with me (The player) Thankyou for your time.

more ▼

asked May 31, 2010 at 07:13 PM

Quentin gravatar image

Quentin
30 10 8 10

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Noone will "send" you a script, this is UnityAnswers, not UnityFreeCommissions. Here's how you can set it up yourself:

  • Download the Detonator Pack and extract it into your Unity project.
  • Add a small Trigger collider around your mine.
  • Create a script using OnTriggerEnter that will instantiate a new instance of a Detonator prefab when the player enters the mine.
  • Optionally, destroy the mine game object using Destroy(gameObject);

That will cause a fairly large explosion to take place when someone walks too near a mine.

more ▼

answered May 31, 2010 at 09:22 PM

qJake gravatar image

qJake
12.7k 91 122 201

(comments are locked)
10|3000 characters needed characters left

This is almost like asking around if somebody can write the game for you. That's not so easy. You need to make in example some particles for the explosion. After that a script that when the mine collides with the character, it transforms in the particles object. So at least now you can make that BOOM object with particles now! And later come back and ask how to make a script that transforms an entity into another one when it collides with the character :)

more ▼

answered May 31, 2010 at 07:36 PM

GODLIKE gravatar image

GODLIKE
529 15 14 28

Did this make any sense to anyone?

May 31, 2010 at 09:18 PM qJake
(comments are locked)
10|3000 characters needed characters left

The explosion should be made completley with the particle system. Then you you script it so the object blows on contact and removes itself from the scene. A great example is on the unity website in the tutorial section. Click on the FPS tut and read it through. There is also a premade explosion in the standard assets in the particles section. Hope this helps!!!

more ▼

answered Jun 20, 2010 at 03:42 AM

Pirate___man gravatar image

Pirate___man
358 17 13 33

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4159
x1039
x221
x144

asked: May 31, 2010 at 07:13 PM

Seen: 2563 times

Last Updated: Jun 01, 2010 at 07:47 AM