Count number of character in a text

AppsterAppster Member Posts: 112
edited November -1 in Working with GS (Mac)
Hi all, is there a way I can count number of character in text field? Supposedly I have a text field with the word "Gamesalad", I want to be able to count how many "a" are there in the field.

Any advice will be much appreciated. Thanks.

Comments

  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    only if you have all the characters separately.

    make an integer game attribute called count

    So if "A" collides or overlaps with field
    Change attribute game.count to game.count+1

    Make a new actor.
    Set opacity to 0
    Put in display text behavior

    and choose game.count where is says hallo world
Sign In or Register to comment.