I have a movie that consists of 4 movie clips, a board game on the left and 3 sets of dice on the right. The first set of dice determine where you land on the board, the second determine the drink you will have and the third tell you how many drinks. I want it so that there is a text area that gets written to with all the info. (eg you roll the 1st dice and land on pub 1, you roll the 2nd dice and you get beer, you roll the 3rd dice and you get X3. I want it to write the values like this:- Pub1 Beer X3) At the end of the game the player can print the results off. If you could include how to get a button to print the text area off.
You’d have to set up a variable and then concat things to the end of it. concatation (no I’ve got no clue how that’s really spelled) is done with the “+” symbol. So, everytime the dice are rolled, you simply add to the end of the string like so
or something like that. In the case above, I also took the liberty of putting commas between the strings as they are added together. There is a “split” function which you can use on strings to split the string into an array using any caracter. The default is a comma. So when you need a final showing of the step by step turns you could simply have a text field which has the variable sting, in which case you would get all the die rolls separated by commas, or you could split it into an array and feed that information to other situations.
If you used </br> inside the quotes in the above example, the text would be strung along with line breaks inbetween each entry. This of course is the ideal for output. (just remember to set your text field to “html” or the breaks wont work.)