LordKhaos's Forum Posts

  • Hey, great plugin just a quick question/sugestion,

    on the gridview - setting the json string, it does not support C3 arrays converted to json does it?

    It seems to always fail because C3arrays are represented in JSON as ""{"c2array":true,"size":[1,3,1],"data":[[["kjsv8biod3a4mpxhko9"],["kjsv8bioe8ia557t2al"],["kjsv8bior7ue2770n"]]]}""

    .

    If the gridview to json could verify if the json has a "c2array" key and try to parse the json in "data", it would be great.

    Also, when using a JSON plugin instance instead of a string, it does not seem that the path defined for the JSON object works, the path gets ignored and will try to parse root as far as I can tell - I could be doing something wrong.

  • Completely missed the BBcode thing - thanks a mil, I've got it all working now !

  • Thank you for the reply blackhornet, I actually tried the asJSON but the json I'm getting has empty data.

    I'm trying to set it as text on a text object to debug, maybe thats the problem?

    How are you getting it?

  • Hello,

    On my plugin, I have an array and I want to return it from a function as json to be able to load it into an array object and I want to do the same for a dictionary.

    I've been trying for a while and can't make it work, anyone has a working example I can follow?

    I do know it needs specific syntax (from google searching - I can;t seem to find this info on the documentation) but it still fails.

    Code example that is failing:

    Listinventory()
    {
     	var width = 2;
     	var height = 1;
     	var c2ArrayData = ["cat","dog"]
     	
     	
     	var c2Array = '{"c2array":true,"size":[' + width + ',' + height + ',1],"data":' 
     	+ JSON.stringify(c2ArrayData) + ",[],[]}";
    
    	return c2Array;
    }
    

    This returns: {"c2array":true,"size":[2,1,1],"data":["cat","dog"],[],[]} but I can't seem to load it into an array.

  • The desktop app is great - really easy to setup.

    Quick question: when developing addons and using the "add dev addon", what URL should we use to refer to the webhost nw launches?

    Assuming I have everything setup on the defaults folder and I have the addon folder in there with this structure "addons/myaddon/addon.json".

  • piranha305 Great work with this addon!

    Wouldn't even dream of doing a plugin without this to generate all the necessary files.

    Quick question, not sure if SDK related, but if I want to include auxiliary methods where would be the best place to declare them using the plugin?

    If not using the plugin i would put them on actions.js but not sure if you recommend a better way to do it via the plugin so that I can edit them using the plugin too.

    Thanks in advance !

  • LukeW That dialog tree looks insane ! Pretty nice pixel graphics too

    LoGuz You have a really great old school vibe going on - the whip makes me remember the old Indiana Jones platformer.

    Stunning presentation - love the work with the particles on where the slime is grabbing.

  • Actually it is working as expected, turns out I was using a text object to display the result of the variable but the newline was making it go over the textobject height, causing it to not display.

  • Hello,

    probably a simple question, I want to append values to a local string variable but I'm not sure why my expression is not working:

    If i remove the reference to the variable itself when attributing value then it sets the last value, not sure if there is a workaround or if its a limitation.

    Tagged:

  • Brilliant, thanks for the help dop2000,

    I put the variable set after the wait and it worked.

    Also set to static and it worked.

  • Hello,

    I'm trying to understand the flaw in my logic when subtracting HP from an enemy based on a formula (ATK-DEF) and displaying on a popup ( function call).

    Here is the code:

    Result:

    Seems that the variable value being passed to the Popup_Damage function is the initial one and not the one calculated inside the parent function.

    Just wondering if there is a construct specific logic at work or I'm overlooking something obvious.

    Thanks for all the help in advance.

    Tagged:

  • Hello dop2000,

    Thank you for your response, I wasn't aware we could import addons before loading the the project.

    Launched C3 and loaded the plugin before opening the project and it worked.

    Best regards

  • Hello,

    so after 2 months of not working on the project I finally have time to come back to it...

    But it fails to open due to a missing plugin?

    I thought this was saved on the cloud save or bundled inside the c3p file. I did not have this issue 2 months ago.

    How can I fix it and get back to my project? I would re-import the plugin but the browser wont launch C3.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm just testing it with 1 hero at this point, but the idea is to have more so I ended up putting it in a foreach - that broke the whole thing for instance.

    After clearing out the events inside the foreach it seems that not being in the foreach and having triggers in the subconditions might have been causing some concurrency issues.

    All sorted, and seems the if .. elses are working as intended ( no way to use the debugger in the loop so I'm just assuming its working).

  • Hello,

    just testing some different strategies with the engine.

    I tried to create a conditional logic like this one:

    IF

    IF SUB-CONDITION 1

    ELSE IF SUB-CONDITION 2

    ELSE IF

    ....

    ELSE IF

    ...

    However, seems that when the first IF condition is satisfied, the other else if conditions are stil evaluated and the actions inside them executed. I've found some ways around it but wanted to understand clearly how it works as it might simplify all my code (possibly improve performance). Here is the editor:

    Any help is apreciated!