1. Home
  2. Docs
  3. General Programming
  4. Using Loops

Using Loops

Loops means we would like to do something a certain amount of times.
In SceneMax we declare about a Do – End do block and type commands inside that block for example:

Do 10 times

End do

And now let’s see a real running program using loop to rotate a 3D model from side to side:

Sinbad is a model
David is a Sinbad
Do 10 times
David.rotate(y+30) in 2 seconds
David.rotate(y-30) in 2 seconds
End do

Run this program and see how the Sinbad model is rotating from side to side 30 degrees.

Was this article helpful to you? Yes No

How can we help?