POPWrangle - Action after x frames
2529
2
0
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!
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
-
- pavelPeh
- Member

- 30 posts
- Joined: May 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;
}