Can I make an actor diplay different text from a table everytime a scene is reset?
Trendy
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
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.