Search Unity

Do some damage here

Discussion in 'Scripting' started by Angellify, Jun 2, 2013.

  1. Angellify

    Angellify

    Joined:
    Jun 1, 2013
    Posts:
    15
    Hello.I'm working on a game inspired by Naruto (the anime).So i worked on 2 jutsu (fireball and water bullet) but when the fireball/water bullet hits something is going through it.I tried to add a collider and It's works but not the way I want,when hits something I want the fireball to explode and make some damage,same with the water bullet but not to explode.So please help
     
  2. Glockenbeat

    Glockenbeat

    Joined:
    Apr 24, 2012
    Posts:
    670
    I recommend looking at the tutorials. Those are some pretty basic questions and as far as I know they all should be covered in the tutorials.

    In short what you will need to do is to catch the collision, e.g. in OnCollisionEnter(). Then perform some work like Instantiating a particle system, destroying the bullet and so on.

    But as I said, there are quite some tutorials around which show that exact thing step by step. And other basics as well.
     
  3. Angellify

    Angellify

    Joined:
    Jun 1, 2013
    Posts:
    15
    Yeah, sorry for the very late answer again.
    I learned wassup with the collision so I think I'm able to do it now.