POPWrangle - Action after x frames

   1953   2   0
User Avatar
Member
4 posts
Joined: 12月 2014
Offline
Hi guys, I have a small question for you this time

I'm using this expression in my POPWrange,

if((@P.y>1.05) && ((@v.y)<0))
@viscosity = @viscosity + @viscosity*8;

What happens is when an object splashes, the fluid goes up (P.y>1.05) it freezes (@viscosity = @viscosity + @viscosity*8 with high viscosity

The problem is that i wanted this effect to happen after a certain amount of time. Not in that exact moment. A late action of the effect.

Something like this:
if((@P.y>1.05) && ((@v.y)<0))
After 4 frames >> @viscosity = @viscosity + @viscosity*8

But working

Thanks a lot guys!
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Hi for an action to start after a certain frame you could use a if statement. ie if @frame is true do execute this list of stuff.

ie if (@frame >=12){
@Cd = {1,0,0};
@dothisstuff =1;
}
Gone fishing
User Avatar
Member
30 posts
Joined: 5月 2012
Offline
something like this?



if((@P.y>1.05) && ((@v.y)<0) && i@trigger==0) {
i@trigger = 1;
}

if(i@trigger==1){
f@triggerTimer += f@TimeInc;
}

if(i@triggerTimer==2){//trigger after 2 seconds
@viscosity *= 9;
i@trigger = -1;
}

  • Quick Links