| Code:: |
|
| DJMaze wrote: | ||||||||
| I didn't test the following but it should work Use the following inside the loop
Then a little further down inside the loop use
What does this do? A % is a 'mod' calculation it's like (x = x-((x / 2) * 2)) Say x = 6 then: x / 2 = 3 x * 2 = 6 x - 6 = 0 If x = 7 then: x / 2 = 3.5 = 3 x * 2 = 6 x - 6 = 1 That way you can use something like:
This will output:
|
| Code:: |
|
| Code:: |
|
All times are GMT