0 Members and 4 Guests are viewing this topic.
Quick question, is there a way to loop through static variables? For example, I have 19 sprites Pic00, Pic01, Pic02,...,Pic18, and I'd like to display them horizontally across the screen (until it reaches the edge and go to the next column).I've read somewhere that you can useCode: [Select]For(I,0,18)Pt-On(X,Y,Pic00+I)EndBut all I got is the first sprite pressed down and spread across the screen (think of butter or shift drag in MSPaint).
For(I,0,18)Pt-On(X,Y,Pic00+I)End
.CONC.Setup sprites[FFFFFFFFFFFFFFFFFF81BD959D8581FFFF81A19DA1BD81FFFF81BDA5BDA181FFFF81BDBD858581FFFF8191BD919181FFFF81A199998581FFFF81BDBDBD9981FFFF81BDA5A59981FFFF81A599A5A581FFFF81BDBDBDA581FFFF81A5BDBDBD81FFFF818199998181FFFF8199A5A59981FFFF81BD9D8D8581FFFF81BDB9B1A181FFFF81858D9DBD81FFFF81A1B1B9BD81FFFF81BD99999981FF]->Pic0DiagnosticOffClrHome.DRAW0->X:0->YFor(I,0,35)If X>880->XY+8->YEndPt-On(X,Y,I*8+Pic0)X+8->XEndDispGraph.LOOP TILL ENTERRepeat getKey(9)End
Code: [Select][FFFFFFFFFFFFFFFFFF81BD959D8581FFFF81A19DA1BD81FFFF81BDA5BDA181FFFF81BDBD858581FFFF8191BD919181FFFF81A199998581FFFF81BDBDBD9981FFFF81BDA5A59981FFFF81A599A5A581FFFF81BDBDBDA581FFFF81A5BDBDBD81FFFF818199998181FFFF8199A5A59981FFFF81BD9D8D8581FFFF81BDB9B1A181FFFF81858D9DBD81FFFF81A1B1B9BD81FFFF81BD99999981FF]->Pic0
[FFFFFFFFFFFFFFFFFF81BD959D8581FFFF81A19DA1BD81FFFF81BDA5BDA181FFFF81BDBD858581FFFF8191BD919181FFFF81A199998581FFFF81BDBDBD9981FFFF81BDA5A59981FFFF81A599A5A581FFFF81BDBDBDA581FFFF81A5BDBDBD81FFFF818199998181FFFF8199A5A59981FFFF81BD9D8D8581FFFF81BDB9B1A181FFFF81858D9DBD81FFFF81A1B1B9BD81FFFF81BD99999981FF]->Pic0
[sprite1]->Pic0[sprite2]...[sprite18]
Quick question, is there a way to loop through static variables? For example, I have 19 sprites Pic00, Pic01, Pic02,...,Pic18, and I'd like to display them horizontally across the screen (until it reaches the edge and go to the next column).
For(I,0,11)Pt-On(I*8,0,I*8+Pic00)End