Dealing Cards

The SparksThe Sparks Member, PRO Posts: 5

Hello Everybody,

I'm playing around with GS for a couple of days now. :) I have a small problem.

I like to deal several cards on the table e.g 8x4 cards. I manage to do this with the example from GSHelper with the spawn command and a table filled with the x/y coordinates. But after placing the cards on the table I want to change the image of the cards. These images_names are also listed in a table.

I want the spawncard(actor) moving to it's place on the table with the backside image visible and as soon as the card is in it's correct position the image change into the facecard.

How can I change the images from the spawn actors??

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Each card should have a unique ID, something like self.myRow set to an integer value manually for each actor.

    When [spawning is done / self.Position.X = 125 / or whatever condition you want]
         Change Attribute self.Image to tableCellValue(tableName, self.myRow, 1)

  • The SparksThe Sparks Member, PRO Posts: 5

    Hi Tatiang,

    It works! Thank you!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You're welcome!

Sign In or Register to comment.