Problem With Displaying Text

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

Comments

  • MobileRocketGamesMobileRocketGames Member Posts: 128
    edited December 2012
    The card actors need two attributes. One for the table selected (we will call it tableChoice) and one for the row selected (we will call it rowChoice). To put it simply, once you've selected which table it should draw the random value from and entered that value into the self.tableChoice attribute, you need two rules:

    if self.tableChoice = 1:
      display text = table(game.Table1, self.rowChoice, 1)
    and

    if 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!
  • FlamingbananaFlamingbanana Member, PRO Posts: 90
    @MobileRocketGames Thanks man! I think I also figured out an easier way to do it also :)
Sign In or Register to comment.