LordKhaos's Recent Forum Activity

  • So thats what this bit is about - got it working, thanks a mil for taking the time to help out!

    My plugin is basically a backend inventory manager - it handles adding items to the inventory, filtering and listing them by properties, incrementing specific properties (like when you are forging weapons), handling equiping an item, getting DEF (or other prop) a hero gets from all his equips, etc. Now that I'm happy with v1, just trying to simplify the way it works and how to debug it.

    I could do all of this with dictionaries and arrays on construct but after 2 weeks doing it, I just looked at my event sheet and tought it was going to be impossible to maintain it or modify it. Its way easier to just do this sort of things with JS.

  • Mikal Sorry to re-open this old post, do you happen to have a quick example of what you did?

    I assume "extends SDK.IPluginBase" in instance.js will also have IWorldInstance but I'm unsure how or where to define the weakmap.

  • Brilliant, thanks for that guys.

    I ended up putting the auxiliary methonds in instance.js but might need to put them on 3rd party (addon tab).

    Is there any way to edit 3rd party files I create via the c3ide ? Just trying to see my options to simplify my workflow.

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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:

LordKhaos's avatar

LordKhaos

Member since 2 May, 2020

None one is following LordKhaos yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies