Rushino's Recent Forum Activity

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I would like to know what happen if i make an app that load a 50megs file (XML file that contains some definition) via an ajax call. If the user go back.. does this file are kept in browser cache (along with the game html5 client) ?

    Thanks!

  • Thanks guys! I will get a look at this.

  • So even if the textbox is global.. it will reset its values in the next layout ? alright.. anyway i think i will go the global values route since i want to keep this data and in case i need it i will have it.

    Thanks!

  • Hello,

    It is possible to set values in textboxes in a global manner ? like set text in layoutA then change layout to B and still see the same values in the textboxes ?

    I tried setting the textbox global but the value are not fellowing. So i was wondering what ive been doing wrong.

    In other words.. Theses textboxes are in layoutB but i want to set their values in layoutA.

    Thanks!

  • Well its ok anyway i decided to not use the boolean form but 0 and 1 from now. Thanks for clarifiying this up.

    But honestly that subset of json is kind of cumbersome and iam pretty sure many would say the same. I may not be aware of why you guys decided to use a subset so im just saying! But there no an huge difference between the subset and json so why not using json directly ?

  • Its k anyway i decided to not use the boolean form but 0 and 1 from now. Thanks for clarifiying this out.

  • Hi,

    I sent you a private message regarding this.. but this would be better to answer this here since it could help someone else with the same kind of problem.

    How much flexible is your plugin (in term of accessing multi-level JSON and arrays)? I am exchanging data between a WebSocket server in this format..

    OpCode-Token { ... }

    The end is obviously JSON data. So would it be better to fully handle nested-levels JSON with your plugin (if its flexible enough).. or use your plugin to only parse the first level and prepare the c2array or c2dictionnary JSON directly on the server-side so i end up with..

    1-1234 {"valueA":123, "data":{"c2array":true, "size":[3,1,1], "data":[[[0]],[[1]],[[2]]]}}

    so all i could do in this case is getting data with your plugin and load it to the array. But at the expanse of bandwidth!

    Thanks!

  • I tried converting it. Doesn't work either.. i tried

    int(Dictionary.Get("TestWithBoolean")) = 1 THEN something..

    and

    int(Dictionary.CurrentValue) and i still get 0 after the conversion.

    (you can get the updated sample here.. mediafire.com/download/f3777k3kblq1gac/DictionaryLoadBugWithBooleanAsJSONv2.capx)

    I know booleans aren't number nor string.. but the dictionary object seem (like you said) to allow only string and int comparaison which is a bit odd when you can have booleans values as JSON. Boolean can be (or at least should be) converted to int which could have solved the issue but it doesn't seem to be the case here. You have to agree its a bit confusing :) It may not be a bug.. but could be a feature request then.

    You said your using actively the dictionary for boolean comparaison.. then i would be interested if you could show me exactly what your doing to do that boolean test. Probably something i didn't got right.

    Thanks for your help :)

    EDIT: For now i did a converter on the server side for fixing this issue so i can receive 1 instead of true and 0 instead of false. It work well and also save some bandwidth since true take more space than a single number. Not a big deal but if you receive like 100 elements in an array with boolean that can be nice to have.

  • Hello,

    I found the fellowing bug which is currently putting my project on hold (i use a ton of JSON queries)... if you load the dictionary with this fellowing JSON (a JSON with boolean values)

    {"c2dictionary":true,"data":{ "TestWithBoolean":true, "TestWithoutBoolean":"true" }}

    There is no way to detect that the key TestWithBoolean have 'true' as the value. Using the fellowing event: Key "TestWithBoolean" = "true" doesn't work since its not a string but a boolean without quotes.

    The value in the debugging show 'true' for both the key but in real they different.

    I even tried using a for each to write the values to the log of the browser and i got this..

    TestWithBoolean : 0

    TestWithoutBoolean : true

    I would be glad if you could provide a simple workaround for now.

    Link to .capx file (required!):

    Here a simple sample which show the problem..

    mediafire.com/download/rcru7arw9f7cl9g/DictionaryLoadBugWithBooleanAsJSON.capx

    Steps to reproduce:

    1. Load a dictionary with the JSON. {"c2dictionary":true,"data":{ "TestWithBoolean":true, "TestWithoutBoolean":"true" }}

    2. Try to check if TestWithBoolean have the value 'true'. It won't work!

    Observed result:

    There is no way to detect a boolean. The event will never go in.

    Expected result:

    I expected to be able to test if TestWithBoolean had the value 'true' but i couldn't. At least it should detect TRUE and return 1 in that case..

    Browsers affected:

    Chrome: yes!

    Firefox: yes!

    Internet Explorer: yes!

    Operating system & service pack:

    Windows 7 64bits latest service pack...

    Construct 2 version:

    r146

    Thanks for your help!

  • Alright it work now.. ! Thanks sorry for being a n00b.. haha at first i was pretty sure we could do this otherwise it would have been bothersome!

  • Hi,

    It is possible to immediatly set created object instance properties ?

    Like i want to create an object and then set some instances properties to that object immediatly after ?

    That would be nice to have something like LastCreatedUID or whatever to pick that object in a subevent or something.

    Thanks!

Rushino's avatar

Rushino

Member since 15 Sep, 2013

None one is following Rushino yet!

Connect with Rushino

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies