troublesum's Recent Forum Activity

  • Ruskul - Interesting... while intellesense (I hadn't even considered this) would solve have the problem the last part is if the user removes the behavior there would have to be the dependency check on the reverse side to remove the code in use or warn the user about the error but maybe I'm thinking about this wrong. I wonder if it were possible for Ashley to have 2 IDE's in one. One that's visual that prevents you from making mistakes (like the current IDE) and another one that's for advanced devs allowing them to make mistakes but because they're actual developers that's on them if they get it wrong. That would be interesting if Ashley could pull that off

  • Ruskul - haha.. thanks... and prototype is ugly .. good god if there one thing i hate more its reading and working on object oriented code by developers that use prototype. I know its the standard but the Internet guys need to make method available that's cleaner and more intuitive.

  • Ruskul - You wouldn't be able code this because someObject might not have the behavior enabled that your coding for. If your code depends on a plugin function (IsOverlapping) then you have to have a way to force the developer to enable that behavior for all the sprites that will be worked on by your code. To do this Ashley would have to build in dependency checking and notify the developer that a behavior is required based on the code requirements. Hence the visual IDE he created that does exactly this but in reverse allowing you to select what you have enabled from a drop down menu because that's the only way its even possible to do this and prevent users from writing invalid code.

  • Ruskul - I feel like saying the SDK sux is a bit unfair. I found it fairly easy to learn the API Ashley put in place and write my own plugins. I'm not a fan of the code format as it could have been cleaner but the functionality to do what you want is there. I have a personal plugin (unreleased) that joins the Multiplayer and Function plugins together so I can pass parameters and call functions on all/specific peers with a signal event action. That's pretty powerful functionality available in the API and there are tons more sophisticated plugins than that which are available on the forum. I might be a little biased because I am professional JavaScript developer and I can write it fluidly. But other than the code format its really easy to use.

    I don't know if you know how to code in JavaScript but if you do and I in no way mean to put down your coding abilities but you should see how I rewrote the API from the template Ashley provides to be more clean and intuitive. I removed all prototype usage because its confusing as hell to follow. Check out the runtime.js file from my 2D Dictionary Plugin https://www.scirra.com/forum/plugin-table-2d-dictionary_t125862. If you use any kind of IDE with code folding (i use netbeans) you will see how much easier it is to read and use and might not think it sux.

    You can see how much cleaner and easier it is to add Actions,Conditions,Expressions

    [attachment=0:3tqi4abn][/attachment:3tqi4abn]

  • Interesting... a quick way to see what plugins you have that have an update available that can be one click updated is a great idea!... I recommend if possible to keep a version history that users can revert to if for some reason an updated plugin is broken they can go back to the last good version they were using.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bucktoothfrog - Per your request was able to add the ability to Merge C2 Data editor arrays directly into the Storage object. I have updated the original post so please re-download the plugin from there. Below are some screen shots and examples of usage.

    Example of loading the AsJSON example of the C2 Data Editor you gave me and then retrieving the values.

    [attachment=2:2k6x8nqb][/attachment:2k6x8nqb]

    [attachment=1:2k6x8nqb][/attachment:2k6x8nqb]

    Example Capx

    [attachment=0:2k6x8nqb][/attachment:2k6x8nqb]

    Let me know if you have any questions. Thank you

  • bucktoothfrog - Tell you what I can do... if can you send me an exact example of the JSON string you get from the C2 Data editor (I've never used it) that you want to load into my plugin ill see about making my plugin support merging it. I'm sure I can make it work and It will help others in the future that wind up trying to do the same thing

  • bucktoothfrog - The purpose of this plugin was to get away from index values and access data via names. if you can modify how you input your data into this plugin to contain only JSON objects with named keys instead an Array that is indexed it should work fine

    try loading this (Notice the "0" and "1" are strings)

    {"Data":{"0":{"lat":1,"long":11},"1":{"lat":2,"long":12}}}

    You can then retrieve the values using the get action

    Storage.get("Data","0","lat") = 1

    Storage.get("Data","0","long") = 11

    Storage.get("Data","1","lat") = 2

    Storage.get("Data","1","long") = 12

  • AGCompany - No problem let me see if I can help .. So if I understand you correctly your trying to load this into the table object and and then get the "somekey" value out of out it?

    {
    "USER": {
    	"somekey": "somevalue"
        }
    }
    [/code:2tnb5y4c]
    
    A 2D JSON object is considered a Table and each row in it is a List and each List has fields with Values. 
    
    Table=> [List]  => [Field]      = Value 
    Table=> USER => somekey = somevalue
    
    You need to use the "Merge JSON to Table action to load your JSON object and then use the Table.Get([ul],[field]) expression to retrieve the value
    [attachment=1:2tnb5y4c][/attachment:2tnb5y4c]
    
    The screen shot above will print "somevalue" to the text object
    
    Here is a capx demonstrating how to get the value
    [attachment=0:2tnb5y4c][/attachment:2tnb5y4c]
    
    Hopefully this helps
  • This is a simple 2 dimensional associative array (values access by "name" instead of integer "0" index). It functions just like the official "Dictionary" plugin but it has 2 dimensions instead of 1.

    It supports loading raw JSON data directly to it which can be useful if you do a lot with AJAX.

    It supports minification and I believe all bugs have been found but if you find any please let me know. I use this in all my projects so I will actively maintain it to ensure it works correctly.

    Plugin

    TRBLSM_table.zip

    Example capx that demonstrates all functions supported.

    TableExample.capx

    If you have any questions or need help using it Ill do my best to answer in a timely manor.

    Thank you

    P.S I also created a 3D version so you if you need a larger object you can try out the "Storage" plugin instead.

    [Plugin] - Storage (3D Dictionary)

    https://www.scirra.com/forum/plugin-storage-3d-dictionary_t125861

  • bentwonk - Thank you.. I fixed it in mine. Also because you guys seem to like it so much I created a forum post for this plugin to make it available. Thank you for the kind words

  • bucktoothfrog - I just added this plugin. It will probably work for what your looking for. It supports loading raw JSON directly into it and accessing the data via named indexes.

    https://www.scirra.com/forum/plugin-storage-3d-dictionary_t125861

troublesum's avatar

troublesum

Member since 4 Dec, 2013

Twitter
troublesum has 2 followers

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies