GarryPlays's Forum Posts

  • 8 posts
  • Wish that would exist for Construct 3 :)

  • I can only point you to my help thread which no one answered either.

    Maybe you can find a hint in there, you can either change your json to a contruct formed one or hope for someone to answer :) really curious myself how to get a normal json in C3

    construct.net/forum/construct-3/how-do-i-8/json-to-dictionary-135343

  • Search for forums would also be great, or not every single post that looks promising ending on a 404.

    Here the hack for delivering a correct json (again, this does not answer my question, I don't want to modify my php, there must be a way in construct 3 to deal with it)

    <?php header('Content-type: application/json'); $json = array(); $json['c2dictionary'] = true; $json['data']['asd'] = '123'; echo json_encode($json); ?>

  • Ok so this works

    echo '{"c2dictionary":true,"data":{"asd":"123"}}';

    I see. So then how do I get a normal json response {"asd":"123"} into this format? (without rewriting it in php of course)

    There must be something I am missing here.

  • Here my php in case that helps.

    <?php

    // try to return json

    header('Content-type: application/json');

    $json = array( "asd" => "123" );

    echo json_encode($json);

    //return json_encode($json);

    ?>

  • AJAX.lastData = { "asd" : "123" }

    For the love of god do I not find a way to get that into a dictionary.

    Please help. Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, bit lost here.

    Launching an ajax call to test.php it returns: {"123":"test"}

    I tried Dictionary load from json string ajax.lastdata it also shows count 1 but when I use dictionary.get("123") it only displays a 0

    Trying without ajax just a string to dictionary: "{""asd"":""test""}"

    dictionary.get("asd") returns 0

    however adding a key via: add key "ok" value "test"

    dictionary.get("ok") returns test

    must be doing something basic wrong. maybe someone has a tip

  • Hi, for someone who knows Unity and never tried Construct 3.

    How would following scenario be done in Construct (just rough description)

    I have a Character of which each part can be replaced. Legs can change, Head can change etc.

    How does animation work in Construct? Is that literally just sprites. So I would need to assemble my character, write out the poses I need and then somehow get that in Construct?

    Or is there some form of bone system?

    And will it work on phones, too?

  • 8 posts