Problem With Displaying Text
Flamingbanana
Member, PRO Posts: 90
Hey everyone,
I'm creating a memory-type game. I have 24 cards that are all one actor. Each will get a text value from two different tables. It chooses a random table and then chooses a random value from that table. I'm trying to display the text that it picked up from the table it chose but it's it is not working. I can't tell if the value isn't getting into the attribute or if it's not displaying it for some reason. If someone could help that would be great. I have a screen shot so you can look at it.
https://docs.google.com/open?id=0B9KyCZOGyyf7Tjd6LW5GMHJ5b3M
Thanks,
Flamingbanana
I'm creating a memory-type game. I have 24 cards that are all one actor. Each will get a text value from two different tables. It chooses a random table and then chooses a random value from that table. I'm trying to display the text that it picked up from the table it chose but it's it is not working. I can't tell if the value isn't getting into the attribute or if it's not displaying it for some reason. If someone could help that would be great. I have a screen shot so you can look at it.
https://docs.google.com/open?id=0B9KyCZOGyyf7Tjd6LW5GMHJ5b3M
Thanks,
Flamingbanana
Comments
if self.tableChoice = 1:
display text = table(game.Table1, self.rowChoice, 1)
andif self.tableChoice = 2
display text table(game.Table2, self.rowChoice, 1)
That would be one group of behaviours for one text value picked randomly from the two tables. If each card is going to have two random values then you would just duplicate this procedure (i.e. self.tableChoice2 and self.rowChoice2, etc).This is a pretty simple procedure so I won't go into details about generating the random choice for the table and other misc stuff.
Also, next time if you are requesting help it is best to make your threads as a question and not a discussion so the thread can be closed once an answer has been found (we also get points for helping out this way). You can always rate posts insightful or awesome if you like.
Good luck!