Newbie question: how to get a math expression to execute?

Sorry for the totally ridiculous question - I’m stuck and can’t seem to make heads or tails of how to make a math expression execute!

For example, I want to count from 0 to 19 and display it on screen. At the end, I want to print out “done”. In pseudocode I’d do it as follows:

While (counter < 20) {

I can’t figure out how to make the math expression run though–can’t find a flow pin in. Here’s what I’ve built so far… what am I missing?

Thank you in advance for your help!

For the counting, use a “ForLoop” node, with 0 as the minvalue, and 20 is the max value for example, now for the execution pin after that, call a print String, and plug the index current index number int value (blueish green wire) and drag it over to the Pink input pin on Print String, and plug it in, will create an automatic conversion from the int number to a string form. Then once the loop body completes, create another print string, and write in your “Done” onto it.
Hope that helps! :slight_smile:


It looks like if I want to use a math expression, you have to feed the expression output to an input of another function…

I’ll have to play with blueprints for a while longer to see if it becomes more intuitive. Do people actually find it easier to use blueprints than writing code?

yes i find blueprints easy. It is just another way to think. (i saw someone saying in the forum that it was in fact the total opposite but i don’t know) You just need some time to spend to learn the logic. An exemple for what you asked : the variable counter is an integer (and i forgot to say it has to be set as zero on the down left panel which is not important here because zero is the default setting but can be a trouble in some other cases.) :