Is there a way to "split" a text attribute

theCodeMonsterstheCodeMonsters Member Posts: 359
edited November -1 in Working with GS (Mac)
Now this is a bit hard to explain, but ill do my best.

So say I have an text attribute that is "int700". Is there a way to take just the 700. now here's the tricky part, the 700 is a flexible number. Meaning it could be 900 or 1. Is there a way to do this? to target a specific character set in the Expression editor and collect its data.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    not sure if this is what you mean, but you could do it by displaying as so with display text:

    "int"..attribute

    set the attribute to 700 or whatever and change it to whatever you want and that will display int followed by whatever value the attribute is
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    @JohnPapiomitis Thanks but that's not what I mean. I mean I have a text attribute with the value "age29". Is there a way for me to use gamesalad behaviors to grab that number 29? But again. the number 29 could be 80 or even 17.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sorry, can't mix/manipulate text attributes and integer attributes at the same time. As John recommends, if you need to display them together in Display Text, put:

    scene.Textatt..scene.Ageatt

    ------------------------------------
    http://davidgriffinapps.co.uk/
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    Thanks guys!
Sign In or Register to comment.