I would suggest you to check Khan Academy
since it has some very good video lessons on almost all math related subjects, from the very basic to more advanced ones.
As of your examples, I think you need some understand of basic programming as well, maybe how a loop works. Besides that, tackle a problem one step at a time, asking yourself each basic question that will form the big answer you are looking for. If you can't find it by "googling" it, probably you are asking the wrong questions.
If I understand your example right, you have 20 "cubes" that you need to be put side by side, for a start. Since you know the amount, you can just spawn the right quantity with a "repeat 20 times" loop and a "create" action.
So, if you want to put a cube next to other, from the left to the right, how would you do? The first one needs to be at 0 distance from the left side, so it is right at the side. The second one needs to be at 1 times the width of one cube, so it it right next to the first. The third one at 2 times the width of one cube, so it gives space for the first two. The forth at 3 times the width... As you may have noticed there is pattern here:
next X position = number of cubes * width of one cube.
As an addendum, the repeat has an index, called "loopindex", that returns the number of the current repetition, starting from 0. Back to the repeat loop, you need to fill in the X of it (next X position) with that expression, so, we know now that the repeat has a loopindex that returns a number, if we are creating cubes at each repeat, that loopindex tells us the number of cubes it had created. The width of a cube is a basic expression, you can see it at the expressions help.
So, into the "Create object" action, in the X position, you can translate our "equation" to:
X = loopindex * cube.width
But if you need to add a space between each one, so it it not all side by side? Well, like it is said, you need to add. So to keep the layout divided by 50, so you have 20 cubes evenly spaced, you must add 45 pixels of space to the 5 pixel cube.
X = loopindex * (cube.width + 45)
and that is it, if I understand you right. 20 cubes, 5 pixels wide, evenly distributed on a 1000pixels layout.
The only real tricky part here is the loopindex, but it is part of the sintax of construct "language", you will need to learn it. Construct is very forgiving in that area, with not much to learn, but you will need basic programming knowledge and basic math knowledge, no way around it.dEspadas2012-08-14 06:59:03