attaching moving arms to FPS script

hey everyone!

so im in the process of making a FPS swimming in water.

I created a set of arms in c4D plus rig and a little animated swimming cycle.

I wish for the anmated swimming arms only to be played when pressing forward and in water. Im using the FPS preset script and so I thought to just acess the script and modify.

Any tips on how to do so? im not sure if i should let the swimming arms depend on m_stepinerval or ?
I could of course also just let the animation be triggered by a collider but i want to have it more neat and the arms moving the same way as the steps are triggered from the arrowkeys…

looking forward hearing back from you!

bests

I tried something simple to activate the animated arms, but not even that works…

public class SWIM : MonoBehaviour {

private Animator _anim;

void Start () 
{
	_anim = GetComponent<Animator> ();
}

void OnTriggerEnter(Collider other)

{
	if (other.tag == "Player")
		_anim.SetBool ("swim", true);
	
	}

}