Can I make an actor diplay different text from a table everytime a scene is reset?

TrendyTrendy Member, PRO Posts: 6
I am creating a word game. I set up a series of actors to Display Text taken from a table when Touch is Released. I also created a Reset Scene button. Is there a way to make the same series of actors display different text taken from the same table every time the reset button is pressed?

Comments

  • DuesDues Member Posts: 1,159
  • TrendyTrendy Member, PRO Posts: 6
    Thanks for the link Dues. I had seen this video before. It was not really what I was looking for because the text displayed from the table was random. I did, however, find the answer I was looking for on another site. For anyone else who needs an answer to this question it is as follows:

    1. Create a custom "Integer" attribute for the actor you are using to display text from a table. Name the new attribute "NextRow" or something of the kind.

    2. Create a rule for the aforementioned actor that says when Touch is Pressed do a Change Attribute. The change attribute should be... set: "self.NextRow" to: "self.NextRow+1"

    3. Insert a Display Text behavior (with no rule / preconditions). The display text Display setting should be: tableCellValue(game.TableName, self.NextRow, InsertColumn#)

    With this arrangement every time the actor is pressed it will display the next text entry in the specified column.
Sign In or Register to comment.