Good evening, fellow Constructors.
I hesitate and debate a lot whenever I think about making a post, especially if it's a whole new thread, so please, bear with me.
What I want to achieve is related to looping and spawning certain tiles/blocks in a specific order. I am making a calendar with rexrainbow's system date and time plugin. After some arrays and variables later, I got most of its core set up. Now, all I need to do is have a certain tile spawn many times, filling the calendar (6 rows of 7 tiles each, one per day of the week) depending on the total days of the current month. I have managed to get a loop to spawn just ONE extra tile right beside the original, not the specified 30. Why would that happen?!
My CAPX. I'm using the beta r141. WARNING: May look messy, I think. I feel like I'm exposing my underwear whenever I show people my code.
I'm not the type that asks a lot so I try to exhaust my personal research skills first. This is making me go nuts! Thank you, everyone, in advance!
Develop games in your browser. Powerful, performant & highly capable.
Dont see it as you exposing your underwear... see it as an opportunity to learn something <img src="smileys/smiley2.gif" border="0" align="middle">
You were actually almost there.
When you run in to something like this, try to run it with the new AWESOME debug mode.
When I did that, I could see that you actually did spawn all the days, but they were just spawned on top of each other.
<img src="https://dl.dropboxusercontent.com/u/2560922/mobiledev/forum/calendarUseDebug.png" border="0">
I messed a bit around with your iteration over the days. Have a look at it.
And.. while we are at the learning a bit part <img src="smileys/smiley1.gif" border="0" align="middle"> I changed your function "MonthNameDays" a bit so it is a bit more simple.
Hope this helps your.
How wonderful! I'm finally grasping the looping concepts in C2 better now that I'm implementing them in things of actual use to me. Thank you! Also, the change you made to the first function is simply genius. I need to further develop my programming creativity to see little stuff like that.
Once again, thank you for such a quick reply!
Happy to help. Let us know if you get stuck again. and we will see if we can help you.