Particle Effect Once For Button Hold

I’m making flames shoot out of exhaust in a driving game, and I’m trying to get particles to fire one time while a button is held down. I need the flames to fire every time the button is pressed, but I don’t want them to stay on when the button is held. Anyone have any ideas?

Thanks.

Man, you need to google this, there are tons of existing examples and please give more info. What platform, do you have any existing code? First google search:

That doesn’t really answer my question, but thanks anyways. I understand how to make it stay on, but I want it to emit for a single cycle and stop while I hold the button or mouse down.

I used code from a gun firing, so the action mapped to the particle effect is Shoot();

CODE:

if(Input.GetButton (“Vertical”))
{
Shoot ();
}

END CODE

I figured it out, didn’t realize GetButtonUp was a thing. Works great.