Use integer Table value as an image reference ?!

POMPOM Member Posts: 2,599
edited March 2012 in Tech Support
Hey ,
I have a table with numbers ..
Now i want to make in my actor a simple change to its image , according to the table values..
Change "self.image" To "Thumbnail"..tableCellValue(game.TB Images , game.RowNumber , 1)..".png"

But apparently i can't , the expression is broken ..
Am i doing it wrong ? or is this feature not accessible at the moment?

EDIT:
I can do a simple workaround, but i want to know if it possible this way..

Photobucket Roy

Comments

  • jimmyellingerjimmyellinger Member Posts: 13
    Have you tried setting the column to text instead of integer? Perhaps GS doesn't convert a type of integer to string, which might be what is required.
  • POMPOM Member Posts: 2,599
    edited March 2012
    Thanks for the reply .
    Still having problem .. ill make another check ..

    Photobucket Roy
  • POMPOM Member Posts: 2,599
    edited March 2012
    Ok i just found that the problem is with the figure '0' !
    When the cell value is 0..
    this expression :
    "Thumbnail"..tableCellValue(game.TB Images , game.RowNumber , 1)..".png"

    Is giving the result of : Thumbnail.png

    Instead of : Thumbnail0.png

    Any other value different than '0' is performing as it should..

    Any thoughts ?

    Photobucket Roy
  • MotherHooseMotherHoose Member Posts: 2,456
    yes! Roy … there is no Row# 0 …

    think you may have to just do a rule for when game.RowNumber is O

    I had issue when I wanted to labelRows with a number and not text … then try to reference that label with a gameAttribute … would read that as a Row call and never a label
    … didn't want to have to redo someBehaviors in many instance … so just made another gameAttribute to update with correct row for image

    @};- MH
  • POMPOM Member Posts: 2,599
    edited March 2012
    @MotherHoose
    I will give you MANY flowers next time we meet !
    That was the problems .. many thanks !

    Photobucket Roy
  • MotherHooseMotherHoose Member Posts: 2,456
    edited March 2012
    ah Roy … Rose of Sharon … would be most appreciated!     חבצלת

    image


    @FryGuy … my brain is well packaged! =))

    @};- MH
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
  • POMPOM Member Posts: 2,599
    את מדברת עברית? אין מצב!

    Will make sure you'll get your bouquet of 'Roses of sharon' !!

    Photobucket Roy
  • MotherHooseMotherHoose Member Posts: 2,456
    בשום אופן לא! … but, I fluently copy/paste most languages!

    weirdly my iPad and Desktop but utilize Hebrew "QWERTY"

    don't ask … private matter!

    @};- MH
Sign In or Register to comment.