Random images
Walasky
Member Posts: 10
Hi again, so how can i put a random image from a table, and compare that image with another one.
I hope you can help me.
Bad english, i know
Comments
Change attribute self.Image to tableCellValue(tableName,random(1,tableRowCount(tableName)),col). Make sure column 1 of the table is set to "text" and that you have typed in a text string in each row that matches the image filename (for example, if the filename is dragon.png then you would type "dragon" into the table cell without the quotes).
Are you wanting to compare the images of two different actors to see if they are the same?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
ooh i see, and yes, i have to compare two images, if i touch the same image do something.
Then you need to store each actor's self.Image value in two different game attributes that are text attributes.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
ok, let me try it, thanks a lot.
@tatiang i could make the random pick from the table, but i can't compare an image and a value from the table, like a match game.
Why not? How did you try to do it? This should work:
If attribute self.Image = tableCellValue(tableName,row,col)
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
it works, thanks for help, and sorry about my newby questions , thanks a lot