text manipulation

0 favourites
  • 3 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • im having a hard time figuring this out, because i never used this string functions before...

    i want to loop thru this string and get every value in an array


    this i found out

    tokencount(varload,"|") - 1 = number of seperators

    find(varload, "|") = first part of the string before "|"

    but now how do i get to the next value of the seperator?

    ive seen some examples but i dont understand, can anybody explain how and how its works?

    if i know how to loop thru all these i should also be able to put then in an array i guess

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • vtrix, is this what you're looking for?


  • find(varload, "|") = position of the first | in the string

    basically you get each token ( = part between separators) by incrementing an iterator

    the iterator can be a simple variable or a loopindex

    global iterator = 0
    every 5.0 seconds :
        set text to tokenat(varload,iterator,"|")
        add 1 to iterator[/code:32ezzhr4]
    [code:32ezzhr4]for "itLoop" from 0 to tokencount(varload,"|")-1
        append to text : tokenat(varload,loopindex("itLoop"),"|")[/code:32ezzhr4]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)