Hello, I'm not very good at scripting and most of what I do is pretty much edit scripts to fit my needs, although in very basic ways.
I'm currently editing a script and I've got the following code:
I would like to do this but with a loop, so I don't have to copy and paste all this code, and get rid of this mess. it basically just adds 10 to the "lineY" variable.
But loops are something I've always struggled to understand. I'm an artist, so my brain is very slow to learn these things 😛
Can anyone help me on this?
I'm currently editing a script and I've got the following code:
Code:
this.drawText(textV_Line,lineX1, lineY, rect.width, 'left') // Draw an vertical line
this.drawText(textV_Line,lineX1, lineY + 10, rect.width, 'left') // Draw an vertical line
this.drawText(textV_Line,lineX1, lineY + 20, rect.width, 'left') // Draw an vertical line.
this.drawText(textV_Line,lineX1, lineY + 30, rect.width, 'left') // Draw an vertical line.
this.drawText(textV_Line,lineX1, lineY + 40, rect.width, 'left') // Draw an vertical line.
this.drawText(textV_Line,lineX1, lineY + 50, rect.width, 'left') // Draw an vertical line.
this.drawText(textV_Line,lineX1, lineY + 60, rect.width, 'left') // Draw an vertical line.
this.drawText(textV_Line,lineX1, lineY + 70, rect.width, 'left') // Draw an vertical line.
I would like to do this but with a loop, so I don't have to copy and paste all this code, and get rid of this mess. it basically just adds 10 to the "lineY" variable.
But loops are something I've always struggled to understand. I'm an artist, so my brain is very slow to learn these things 😛
Can anyone help me on this?