|
Hi I have done a script for a bullet by using documentation of unity but I have a couple of errors. Here you have the code:
And here you have the errors:
And:
And:
Anyone can help me? I achieve the explosion but the player don't loose life >__<' Thanks for all
(comments are locked)
|
|
Only destroy the gameObject once as the last thing in your script. Edit: You should also use
instead of just SendMessage, since you want to call ApplyDamage to the player and not the bullet itself. The player also needs a to have a component attached with a function of the signature:
And the player also need to have the collider object on the same GameObject as the script with the ApplyDamage function. Same problems with this. And when i wrote this post I forgot to write one of the errors (the one regarding to send message)
May 09 '11 at 12:27 PM
Infinity
(comments are locked)
|

Don't you kill the same thing twice?
Don't know, can you help me?