• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
-1
Question by Quentin · May 31, 2010 at 07:13 PM · collisionenemyexplosion

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
8

Answer by qJake · May 31, 2010 at 09:22 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by GODLIKE · May 31, 2010 at 07:36 PM

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 :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image qJake · May 31, 2010 at 09:18 PM 0
Share

Did this make any sense to anyone?

avatar image
0

Answer by Pirate___man · Jun 20, 2010 at 03:42 AM

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!!!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

can someone come up with a script that makes a game object explode and destroy itself on impact with the first person controller 2 Answers

Enemy rigidbody and bullet collisions 1 Answer

How to access a bool of a specific clone in a collision 1 Answer

Fist Punch Collision 0 Answers

Enemy Collision Wont Work! PLEASE HELP 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges