Here’s how I would do it, though that’s not to say it’s the best method; merely the one I could think of right now:
[ol]
[li]Animate your gun fire cycle normally. Make sure you set the animCurves to cycle in pre- and post-infinity.
[/li][li]Disconnect the animCurves from the animated attributes (use the hypergraph for this; don’t use ‘break connection’ in the channelbox as this will also delete the animCurves)
[/li][li]Animate the gun again, but leave the animation static, i.e. just set one key somewhere on all previously animated channels
[/li][li]Disconnect the new animCurves again
[/li][li]Create a choice node for each animated attribute, add 2 inputs per choice node
[/li][li]Connect the ‘static’ animCurve.output attribute to the choice.input[0], and the ‘animated’ animCurve.output to choice.input[1]. Do this for each attribute/pair of animCurves/choice node.
[/li][li]Create an integer attribute on some object which you want to use as the ‘on/off’ switch
[/li][li]Connect that on/off attribute to the choice.selector attribute
[/li][/ol]
This way, the choice node acts as a ‘router’ or ‘inhibitor’. Only when the on/off attribute is set to 1 do the cycled animated animCurves get connected to the gun, at which point it begins firing. When set to off (0) the static animCurve gets connected and the gun doesn’t fire.
An alternative, with less setup hassle, might be to simply connect some on/off attribute to each animated animCurve’s Node State attribute, switching it from Normal to HasNoEffect (though I haven’t tested this)