# Triggering and looping a character

**URL:** https://forum.highend3d.com/t/triggering-and-looping-a-character/7119
**Category:** Maya
**Tags:** mel
**Created:** [July 3, 2001, 9:44pm UTC](https://forum.highend3d.com/t/triggering-and-looping-a-character/7119 "2001-07-03T21:44:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yeeeeeeha](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/y/a4c791/32.png) [@yeeeeeeha](https://forum.highend3d.com/u/yeeeeeeha)
#### Post date: [July 3, 2001, 9:44pm UTC](https://forum.highend3d.com/t/triggering-and-looping-a-character/7119/1 "2001-07-03T21:44:13Z")

</div>

Hi All, first let me qualify this post as seriously newbee to scripting and MEL.

Basicly I'm trying to tie a Character(TRAX) to the emission rate of a particle group. My set up is as such: A particle emiter which emits at a user definable rate and a Character TRAX clip which needs to play each time a particle is emitted.

This is what I've tried so far..

recoil.startFrame = 24/GunAim.Fire\_Rate

Recoil is the TRAX clip I want to repeat, I'm working at 24fps and I have Fire\_rate tied to the rates of multiple emitters. my range for Fire\_rate is 1 to 10.

So if I chage fire\_rate I want the recoil TRAX clip to change rate as well.. or correspond to it.

The above expression will play the TRAX clip once at a correct frame but I just can't seem to figure out how to get it to continue or loop with the subsequently emitted particles. I'm trying to set it up so a simple change of fire\_rate will change the rate of the TRAX clip.

I don't want to stretch the clip. The clip should play over itself if the rate causes the frames to overlap. There should be a pause after each clip cycle.

So, if anyone has some insight I'd much appreciate it. I feel like it's more simple than I think but I just can't seem to make the jump of logic here..
