need help with tables.
hi all, on each level i have a display actor, if level 1 score is 500 to display first image, if score is 1000 to display 2nd image and if is 1500 to display 3rd image. now on level 2 or higher levels my requirements points will change, so how can i use tables so it changes images according to my score requirements? or i have to click on each scene, unlock the actor and change that attribute? i already try tshirtbooth videos but i can't get it to work.
Comments
i.e. self.counter = 1
I assume your table (Let's call it LevelReqs), has an integer column with the requirements for the scores, and a text column with the name of the images (without .png).
So something like this:
500,image1
1000,image2
1500,image3 ...etc
Make a rule that says
Rule: If game.Score <= tableCellValue(game.LevelReqs,self.counter,1)
--Change Attribute: self.Image to tableCellValue(game.LevelReqs,self.counter,2)
Otherwise:
--Timer every .01 seconds
----Change Attribute: self.counter to self.counter +1
The Otherwise will increment the counter until the Rule is true, in which it has the row with the image name that you need.