rhg1968's Forum Posts

  • Make sure you download the example again. I have changed it with each version of plugin I have uploaded. I just downloaded the one from the website (JsonAddOnTest), and it ran without issue with JsonManager 1.0.1

  • Just published a plugin that allows events to be sent with optional messages attached, that can be caught in one or more events throughout your application.

    The example file included with the plugin shows one scenario where an event sheet is included in two layout event sheets. This included event sheet generates an event, but based on which main layout event sheet is active, perform different actions. A message is also sent with the event that is displayed on the screen. You could also have multiple event sheets respond with some action based on one event.

    This allows you to decouple your a logic a little more than usually possible.

    Hope you find this useful.

    https://www.construct.net/wf/make-games/addons/143/event-trigger

  • grossd

    I modified the sample so that it populates the list box and creates a dictionary from that new json structure you sent. It populates the text box with the dictionary.

    The Json structure with just arrays of data is not easy to parse like this even in javascript. If the arrays contained objects that had properties it would be a little easier to query. But with just arrays of strings you have to have a little knowledge of the structure to parse it. The example in the link below is the best way I can think to do it.

    I hope this helps

    https://www.dropbox.com/s/xzcykh9ab7032d3/jsonSample%20%284%29.c3p?dl=0

  • Try Construct 3

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

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

    I'll take a look and I'll get back to you with how to do that.

  • grossd

    No problem. If you have any questions about how it works, just let me know

  • grossd

    Here is a new copy of the file you sent to me. I got it working the way I think you want, updating an actual list box. I used the JsonManager loop instead of the built in array object. It looks like it works well, if you have any question, just let me know.

    https://www.dropbox.com/s/m2lxy0ppsjlgdmt/jsonSample%20%283%29.c3p?dl=0

  • grossd

    I just published version 1.0.1 which adds a new action to load json from a string. The action is called Load Json From String. Hope this helps

  • I will look at adding the ability to load json from a string as an option

  • Not sure this will help, but I have a json manager plugin out there for working with Json.

    https://www.construct.net/wf/make-games/addons/138/json-manager

  • Ashley

    Just wanted to say thank you. That documentation was awesome and I now have my json manager plugin looping over array items in the new c3 runtime.

  • Ashley

    Thank you !!!!!

    I will take a look at it a little later. I appreciate you getting back to me and I am really loving Construct 3

  • zjc121

    Found your issue

    This caught me also when I started with my first plugin.

    You did everything right copying the id to the right places, but there is one exception to the rule.

    In the en-US.json file the plugin specified needs to be all in lowercase. This is the only place this is required. Once I did that your plugin loaded up without issue.

    Also I would suggest using a good editor like visual studio code

  • zjc121

    The easiest thing to do is to probably zip up the files and put it on one drive,google drive,etc...

    Than make the folder you put it in accessible and put the link in the forum.

  • zjc121

    I would need to have you attach the files you modified so I can see what is wrong. How the files map to eachtoher through keys is very important. Also when setting the display text of an item, you have to include tokens for each parameter that you add/remove to the item. If you have 2 parameters, then the display text must have 2 place holders somewhere in the text like {0} {1}.

  • I can appreciate that, but I am looking for an example of how to implement looping in the new runtime with re-triggering. I have my plugin work well, to the best of my knowledge :), in the old runtime. I would like to make it compatible with the new runtime. If I need to wait, I'll put that task to the side for now.