Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Procedure calling on particle collision and count frames?

2 REPLIES 2
Reply
Message 1 of 3
fcascinelli
259 Views, 2 Replies

Procedure calling on particle collision and count frames?

hi there,

i'm trying to get a procedure call on particle collision, count 6 six frames, and stop the procedure.

for example, say: particle 1 collide with pCube1, dies and call the procedure (so far so good) then something happens for 6 frm (or whatever number of frames you like) and then it stops. 

i've been stuck on this for a while... both with expressions or mel code.

thanks
f

2 REPLIES 2
Message 2 of 3
fcascinelli
in reply to: fcascinelli

for those who might be interested... i ended up with this:

 

int $crt = `currentTime -q`;
int $cnt = $crt + 5;
for($i = $crt; $i <= $cnt; $i++){

$tmr = `currentTime -edit $i`;

print ($tmr + "\n");

}


f

Message 3 of 3
fcascinelli
in reply to: fcascinelli

a different approach: 


// procedure

global proc cnt(int $i) {

print ($i + ".\n");

}

// expression

int $i;

if ($i <6) {

cnt($i);

$i++;

} else {

print "hello\n";

$i =0;

}


thanks
f

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report