I created a script so when an object collides with something, it should trigger a Detonator explosion.
This is the script I am using (it also destroys its own gameobject): http://www.pasteit4me.com/936004
The problem is that when I attach an explosion (for the time being I’m using “Chunks”) I get an error message whenever I collide saying “Object reference not set to an instance of an object”. When double clicked, it points to the line “using UnityEngine;” in the DetonatorFireball.cs script.
The odd thing is that I still see the smoke trails and the “chunks” flying off, and when I leave these certain check-boxes unchecked: ImageShack - Best place for all of your image hosting and image sharing needs the message goes away.
Anyone know what is wrong here?
Oh, I tested the detonators with their pre-built test scene and everything worked fine.
EDIT: I updated the picture