Hi,
does anybody know, how I can achieve to add something to a value every nth frame and not to reset that added amount after that frame. I want particles to get higher in a "jumpy" way every 10 frames or so, keep that value for 10 frames and do the same again. I thought about that for a few days now and can't come to a solution.
Cheers, Lukas
SOLVED: Add value, every nth frame?
-
gitarrenvogel
- Posts: 35
- Joined: 20 Apr 2013, 15:40
SOLVED: Add value, every nth frame?
Last edited by gitarrenvogel on 14 Dec 2013, 21:51, edited 1 time in total.
-
csaez
- Posts: 253
- Joined: 09 Jul 2012, 13:31
- Skype: csaezmargotta
- Location: Sydney, Australia
Re: Add value, every nth frame?
Hey Lukas,
I would try using the modulo of the current frame.
I would try using the modulo of the current frame.
Code: Select all
currentframe __ modulo ____ equal __________ if ____ execute
10 __/ / /
0 __/ /
add _/-
gitarrenvogel
- Posts: 35
- Joined: 20 Apr 2013, 15:40
Re: Add value, every nth frame?
Thanks for your recommendation, but isn't this pretty much the same, as if I'd use an every nth frame node?
Let me get this right: I use the current frame as modulo value and modulo it by 10, so it is constantly counting from 0 to 9. I take this value and look, when it's equal to zero, which is every 10th frame, so I get a positive boolean every 10th frame. Or did I get you wrong?
Thank you!
Let me get this right: I use the current frame as modulo value and modulo it by 10, so it is constantly counting from 0 to 9. I take this value and look, when it's equal to zero, which is every 10th frame, so I get a positive boolean every 10th frame. Or did I get you wrong?
Thank you!
-
csaez
- Posts: 253
- Joined: 09 Jul 2012, 13:31
- Skype: csaezmargotta
- Location: Sydney, Australia
Re: Add value, every nth frame?
lol, I didn't know about 'every nth frame' compound.
Yes, it is pretty much the same thing
Are you working in a simulated ICETree?
Yes, it is pretty much the same thing
Are you working in a simulated ICETree?
-
gitarrenvogel
- Posts: 35
- Joined: 20 Apr 2013, 15:40
Re: Add value, every nth frame?
Ah, ok 
So, I came up with a solution, if anybody is interested: I took the current frame divided it by the value X - which is the frame step I want - then round that amount. Now it counts +1 every X number of frames. So I can use this as a multiplier for my add-value.
So, I came up with a solution, if anybody is interested: I took the current frame divided it by the value X - which is the frame step I want - then round that amount. Now it counts +1 every X number of frames. So I can use this as a multiplier for my add-value.
