IF statement and WHILE loop in Vops

   3296   4   1
User Avatar
Member
169 posts
Joined: April 2014
Offline
I'm trying to wrap my head around Vops IF and WHILE statements. Especially the ‘condition’ part.

Am I understanding it correctly when I say that you must reduce the condition on which these statements operate to a 0 or a 1?

So the condition must be either 0 or 1.

I CANNOT for example produce something like:

IF (POINT == 45) then execute code.

The only way I could do this is with something that looks at the numbers, and when it sees 45 it transforms it into a 1, which activates the IF statement?

So in this version it would be something like:

Value = 0.
When Point number == 45, then Value = 1
I pipe in Value into the IF statement condition and when it gets the 1, it executes the IF code.

Am I correct or am I missing something?
Edited by - Feb. 23, 2015 16:26:26
Winter is coming!
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
if (POINT == 45)?
A single = is an assigmnet operator.

Cheers
Bonsak
Edited by - Feb. 23, 2015 16:26:13
http://www.racecar.no [www.racecar.no]
User Avatar
Member
169 posts
Joined: April 2014
Offline
bonsak
if (POINT == 45)…
A single = is an assigmnet operator.

Cheers
Bonsak

Yeah, sorry, that was an oversight I've corrected it.
Winter is coming!
User Avatar
Member
339 posts
Joined: Aug. 2007
Offline
That's correct, you generally use a Compare node to get the boolean. Threre are also And and OR nodes.
Jesse Erickson
Fx Animator
WDAS
User Avatar
Member
169 posts
Joined: April 2014
Offline
tjeeds
That's correct, you generally use a Compare node to get the boolean. Threre are also And and OR nodes.

Got it - thank you.
Winter is coming!
  • Quick Links