tusamten's Forum Posts

  • 2 posts
  • You have the array format wrong. Download your array2 as json and compare.

    Oh,I know what wrong with it. In inspector,I can't perceive what different with it ,so I don't realize that the format is wrong.

    thanks reply.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    I use double loops and Array.at() to read data for condition , but I can't get values of Array which its data load from .json file.

    This problem occurs in my project , so I created a new project to test , and then there is the same problem in the new project , I think it was not my mistake .

    Attach a Capx

    https://drive.google.com/file/d/0B06nox ... sp=sharing

    Description of Capx

    In the test.Capx , there are two Arrays,two ProgressBars,an AJAX object and array.json file.

    data of Array1 load from array.json which is requested by AJAX , data of Array2 are generated by random() fuction . Then Using double loops to get values of both Arrays ,and let two ProgressBars adding the values to current progress value .

    Steps to Reproduce Bug

    • Use AJAX to request .json file in project .
    • Create Array then load json string fom AJAX.lastdata .
    • use loops to get value of Array , then try any method (eg. condition) to reference Array .

    Observed Result

    There is weird that I can see values from Array1 in Inspector(load from array.json correctly) , but ProgressBar Can not get the values .

    Expected Result

    ProgressBar Can get the values of Array1,then adding the values to current progress value,showing performance correctly.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 64bit Service Pack 1

    Construct 2 Version ID

    Release 173

  • 2 posts