Trying to display a merged series of numbers from separate variables (resolved)

From the Asset Store
Magic Series FIRE Sound Pack comes with 600 high-quality sound effects
  • Hi everyone, so I'm trying to construct a 8x8 pixel art editor that outputs binary values for the Odyssey 2 1978 console.. I'm learning how to make games on it, but for making sprites the values are primitive.. 8 rows of 8 bit values..

    So I just thought it would be fun to make an editor that basically spit out the binary values next to each of the 8 rows, but so far when I try something like var1&var2&var3.. the value still just shows up as 0 in the text field.. even if the first value is 1.. i was hoping to display them in a single text field just so copy and pasting could be done easily..

    Is there a way to get a text field to display the numbers together like for example. "10110110" each 0 or 1 being dictated by which boxes in the 8x8 sprite grid.

    Weird request I realize, but the basic inquiry though I imagine must be possible. I just don't get why.

    I know i could make a bunch of separate text fields for each individual number and i might just do that for quick / dirty.. but the results surprised me when & didn't merge the values as text not numeric / mathematical values.. but maybe that's the problem.

  • When you use & operator with integer values, it works as boolean "AND" operator. You need to tell Construct that you are concatenating string values.

    You can try this:

    Set result to ""&val1&val2&val3 etc.

    Or convert them to strings:

    Set result to str(val1)&str(val2)&str(val3)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was thinking when they went to a text field they were converted to string..

    that makes sense, thanks! You're the best! =D

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)