grossd's Forum Posts

  • Hi,

    Yes!

    That is the approach I did as well. Just yours is much cleaner -- to use loop index (instead of a local variable) in the subevent to identify the column.

    great.

    thank you,

    Dan

  • I solved it in a somewhat cumbersome way:

    Since the loop apparently goes through all values in the table "breadth first" -- across each row, i added two subevents with condition 0 and 1, respectively. i then have a counter that "flip flops" between 0 and 1 (by adding one to a counter and then taking modulu 2).

    Like this each subevent "knows" what column it handles.

    But, i think its is pretty cumbersome and better if there is a simple way to access each column in a received row -- via a simple expression.

    can this be done

  • Hi,

    Could i ask you how the loop would be changed if i am downloading a table rather than a column only. Something like below.

    Now, i would want to show Str1 to Str4 in the listbox, while storing in a dictionary Str1 ... Str4 as keys with the numbers "1" to "4" as the values ...

    (i.e. a mapping from the strings to their respective identifiers

    I tried to add the accessor [0] of [1], such as: trim(JsonManager.GetJsonValue("","[1]","Yes")), to access the strings, when building the listbox, but this didn't work.

    thank you!

    Daniel

    {

    "range": "Sheet1!A4:B7",

    "majorDimension": "ROWS",

    "values": [ [ "1", "Str1" ],

    [ "2", "Str2" ],

    [ "3", "Str3" ],

    [ "4", "Str4" ]

    ]

    }

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thank you!

    this is very educational example, how to use the constructs together.

  • Hi,

    Below is a sample that doesnt seem to parse correctly.

    dropbox.com/s/apzz8j7qw4t3nl0/jsonSample.c3p

    if you can look at it,

    thank you,

    Daniel

  • Hello,

    I am trying to use google sheets as backend for storing data.

    Has anyone successfully implemented the oAuth authentication process in C3

    thank you,

    Dan

  • Hi

    Thank you.

    As mentioned in the plugin comments -- its a great plugin indeed, but for my purposes it would need to support reading in json from a string rather than a file only. If you could add this functionality that would be great.

    (or, alternatively, or in addition, to have the plugin submit a user provided ajax call, that expects a json string in return, which is then used to populated the json manager)

    Dan

  • Hello

    I am using an ajax call to access google sheets, to retrieve a range of values (e.g. sheet1!A1:A3)

    The reply format is in json such as follows.

    I want to insert value1 ... value3 into a listbox, but have difficulties accessing the items in the values array.

    How is this done in C2 or C3 ?

    thank you,

    Dan

    {

    "range": "sheet1!A1:A3",

    "majorDimension": "ROWS",

    "values": [ [ "value1" ],

    [ "value2" ],

    [ "value3" ],

    ]

    }

  • Good point ...

    I wouldn't know, since i haven't developed C2 nor C3 plugins.

    But, whoever would do some porting will likely quickly notice to what extent plugins could be automatically ported.

    Dan

  • Hello,

    C3 is awesome. However, its really great with lots of plugins extending its capabilities.

    Philip Deblonde put together a while back a long list of plugins for C2 on git, which would be great to port to C3.

    github.com/Pseudopode/construct2_plugins_behaviors

    Question:

    Could there be enough C2/C3 community members interested in crowd funding the porting of the plugins from C2 to C3?

    Are there plugin developers who would be willing to take on that paid job?

    looking forward to your responses,

    Dan

    p.s. Philip is not available for porting, but is happy to provide (from time to time) guidance

  • <insert dropbox logic>

    Bandwidth hog?

    :-)

    thanks,

    Dan

  • Hi,

    I used to serve game from the public dropbox folder, but now, i only can view the shared index.html file.

    Was this feature disabled by dropbox?

    thank you,

    Dan

  • wow, great ...

    i will study your code carefully,

    thanks!

    dan

  • what i need to be able to do, for example, is loop over each sprite instance of an object type in a family, and add up the current animation frame number.

    In pesudo code this looks like this:

    set global variable v = 0

    for each instance inst of object type in family boxes

    add to v inst.animationFrame

    This code should run everything any of the boxes is touched / tougled

    this would yield a number that indicates if all animation frames are zero -- i.e. white, or at least one red, i.e. the sum is greater than zero.

    But, i don't see a way to do this with family

    the only way i see right now is to hard code the sum using the actual sprite names

  • Also, i am changing the color of the boxes by setting (toggling via modulu %) the AnimationFrame value to 0 or 1 -- the zero frame is white, the one frame is red.