Well this is less a question on how to go about coding this as trying to figure out why it's not working. The emitter has a script with OnParticleCollision that calls a simple damage script:
Debug.Log("parent: " + transform.root.name + " other: " + other.name);
if(transform.root == other) {
Debug.Log("Self damage, ignoring...");
return;
}
shp.WeaponCollision(dmg);
The odd thing is that even though the first 'Debug.Log' line shows that the 'transform.root' and 'other' are the same gameObject (the names match up and there is only one of each type of prefab for testing purposes), the if statement is never true. Any ideas?