How do I make my code show an image from tables?
![TeslaX](https://images.v-cdn.net/banned_large.png)
Does anyone have the project files form the 0.9.90 webinar? or know where I can get it? I am trying to do a picture game and pull the images from tables, but I have never displayed anything but text from tables before. In the webinar he did this very dynamically, I would like to use this same method!
Does this at the 34min mark:
http://www.youtube.com/watch?feature=player_embedded&v=8ghHVTwm2X8
Does this at the 34min mark:
http://www.youtube.com/watch?feature=player_embedded&v=8ghHVTwm2X8
Best Answers
-
Braydon_SFX Posts: 9,273
This might help - it's pretty simple.
http://gshelper.com/images-based-on-table-cell-values-gamesalad-video-tutorial/My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
-
Stamu Posts: 92
with change attribute you can assign an image name to the self.image attribute. The name of the image can come from a table cell (text).
Answers
Change attribute self.Image = tableCellValue(mytable,1,1) (Table Name, row, column)
Cell 1,1 in mytable = ImageName
Also, if your working with a prototype actor and have multiple images that are specific to an instance of that actor, and want to save a lot of time. Do something like this:
Place your actor instances in a layer that holds only that type of actor (for organization purposes only). Then rename each instance to a integer such as 1, 2, 3, ... Use the name attribute of that actor to link a cell in a table. ex: self.image = tableCellValue (mytable, 1, self.name). Now, list all of the image names that pertain to an actor instance in the column of the actor name.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS