Turns out the best way to do this was with a generic loop:
or Each File in apppath & "/images/"
- Add 1 to var 'count'
- Array: set index:global('count')to file.CurFile
Is global('count') equal to
File.FileCount(apppath & "/images/"
- Start Loop "createtext" and run Array.SizeX times
On loop "createtext"
- Create Text
- set text to Array(Loopindex)
This created only the necessary objects. I left positioning the text to another probably unnecessarily long chain of events, but am happy to report that all the objects are created as planned. I can essentially just copy these for my tile objects when I get there.
Now my new problem... Making the scrollbar control the position of the text.
The first thing I've done is created a global variable that records the position of the scrollbar as a percentage of how far along it's track it is.
Then I've created a global variable for how tall all of the text objects are. With simple math I find the beginning of all the text objects, and the end.
Then on my scrollbar buttons I've created an event
Mouse is over Downbutton
Left Mouse button is down
- Set Scrollbar.Y to Srollbar.Y + 1
- Text: Set Text.Y to lerp(global('beginning'),global('end'),global('scrollposition')
Since 'scrollposition' is a decimal should it not set Text.Y to the proportionate position? Instead it scrunches all the text objects together at the top of the screen. I can change it to:
Text.Y + lerp(global('beginning'),global('end'),global('scrollposition')
This stops it from scrunching all the objects up on top of eachother, but it scrolls through everything so fast there is still about 75% of the scrollbar left.
Any ideas on how to do this?