Array.loadFromJson()?

0 favourites
  • 2 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • This is what I want to do:

    let profiles_data = await API.profile.list() // returns JSON let ProfilesArray = runtime.objects.ProfilesArray.getFirstInstance() ProfilesArray.load(profiles_data)

    The API parts works fine - is the Load fx exposed in script?

    TLDR;

    The reason I'm asking is because the script-block doesn't wait for the await; even with the System "Wait for previous actions" it continues on to non-script actions. My currently hackaround is using a setTimeout to call the C3 fx...?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • fingerskier Asynchronous functions they do not prevent others from executing. What you need and have a trigger to fire on the condition. I already implemented asynchronous functions in construct 2 and put triggers inside. So I could use the trigger as true in the comparison. As the use of script has a somewhat limited view in c3 and I really don't see much use in c3, because I make my plugins in js in c2, but I believe that you can create the trigger together with the asynchronous function and create a comparison in the script if the trigger equals true and you create the action you need.

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