hi there
working on a pinball game i encounter the following problem:
got a trigger in the sceen that fires a message to an object pyroholder when it was hit - in order to get a visual effect there - this works fine as long i use just one pyroholder
when i duplicate that pyroholder i still have the effect just once…
i think that’s because it fires when the first is found and is not looking for other attached objects.
I asume i’ll have to do a for loop in order to go to the number of n-objects
my code is:
function OnTriggerEnter(ground:Collider) {
print (“pyro”); //particleEmitter.Emit=true;
transform.Find(“pyroHolder”).SendMessage (“Pyro”);
}
how can i go trough all attached objects?