how to turn on an emitter with another emitter?


I currently have a plane (camp fire) that has a fire emitter attached to it, I then have a flame thrower attached to the player. how would I go about creating it so that the emitter on the plane turns on its emitter when the player fires his flame thrower toward the planes collider? in addition i would like the point light to also turn on and off with the emitter but my coding is very poor.

I have my plane with the following C# scipt attached to it, isTrigger & convex are both ticked on the planes collider and a point light has been added as the child of this. myEmitter has been assigned with the flame thrower (drag and dropped)

    public class firetrigger : MonoBehaviour {
public ParticleEmitter myEmitter = null;

void OnTriggerEnter(Collider other){ if(other.CompareTag("Player")) myEmitter.emit = true ; }


my flamethrower also has a world particle collider attached with “send collision message” ticked and the tag “player” attached to him.

Thanks in advance, I dont know what I would do without this site.

One thing with this, you say myEmitter=null and then later tell it to emit. If there is no emitter, how will it emit? You could pass the emitter, but no reason to if you set it in the inspector. So heres what weve got:

A variable for the emitter with the fire emitter assigned to it from the inspector and emit set to false.

A variable for the point light with the light assigned from the inspector, the point lights enabled var set to false.

When particles collide with the fire pit plane, make fire pit emitter emit and turn on the light.

    On FirePit:
public class firetrigger : MonoBehaviour 
    void OnParticleCollision(GameObject other)
        myEmitter.emit = true ;