I am trying to create a baseball simulator. One part of it is the roster of players, which I have put into an array. In my capx file, I have two teams with one chosen at random. How can I loop through the array and display the player's uniform number and name who is up to bat? I created a button that once clicked shows 3 outs, indicating the next player's number/name should show up. Thank you for your help!
Develop games in your browser. Powerful, performant & highly capable.
Index = 0
Set Text to Roster.At(index)
Something like this should work
I do not know much about baseball...but
but maybe this can help..
capx> http://s000.tinyupload.com/index.php?fi ... 1649361859
Thank you, Fireche, for the code, and thank you, korbaach, for the capx file. The file worked exactly as I wanted. Is there an advantage to loading the array data from a JSON string?