Random actors with tables - define what actor/integer it is?

powkiepowkie Member Posts: 63
edited June 2012 in Working with GS (Mac)
Hey everyone!

I have a question. At the moment i have 5 different images i want to get randomized when i press on a button and this is what i did:
- I created a table called sumsum, with 5 rows and 1 column. Each row have the filename of each image i want to randomize. Example: rm1 rm2 rm3 rm4 rm5.
- I also set up a an change attribute inside the actor with:
tableCellValue(game.sumsum,random(1,tableRowCount(game.sumsum)),1)

The images randomize perfectly as i want but the thing is; my image needs to know what kind of image he is with a integer how is it possible to add that? For example if rm1 wan't to know that he is number 10, rm2 wan't to know that he is number 20.

Let me know if you don't understand what i mean and thank you for reading this!

Comments

Sign In or Register to comment.