oosyrag's Forum Posts

  • I think I understand...

    Like I said earlier, the simplest way would be to keep your local data in an array. You can get the entire array as a json string by using the array.asjson expression. Send that to the server for storage.

    Retrieve the array.asjson from the server, and use the array load action to get it back into an array, to append and modify as you wish.

    There's no reason you need to convert the array into key:value pairs unless I'm totally missing something, like you needing to modify or access it with a third party program that can't handle json arrays for some reason.

    The other option would be to use the json object actions to set each path, object, and value, then send json.tocompactstring to the server. Then you can retrieve it and use the json parse action to load it up and be able to modify it again.

    I'd think the array method is cleaner/easier though.

    Edit: I can put together an example using local storage as the "server" later if you need.

  • Right, because an array is just a set of values with no object names, you'll need to create object names manually with the json actions manually.

    Although normally you would want to send an array as an array, and object/value pairs as is.

    Is there any reason you need to convert? Anything that can read json should also be able to read json arrays.

    Or I'm still misunderstanding.

  • I recall a football themed game that was featured in the Google play store a while back, that one took off pretty well. I forgot the name though...

    There is a lot of competition on the play store. On the other hand I'm confident to say it's possible to (re)create 90%+ of all 2d games you can find on the market with enough time and effort in Construct.

  • Works fine? dropbox.com/s/uz5vxy35vjacptj/MetaballsExample.c3p

    There are multiple ways to implement metaballs... You may have missed something important in whatever tutorial you were following.

  • Oh interesting I actually didn't notice that. -1 was the default. Looks like at 0 border size, they include the neighboring cells because they are touching, and therefore colliding. It works all the way to -32, and at -33 the single tile obstacles are no longer counted.

    A way to generate and visualize an obstacle map in the editor could be a nice feature to add...

  • If you don't want to use a Json array, then you can manually create keys with the JSON object actions set path, set object, and set value actions. Then the tobeautifiedstring or the tocompactstring expressions will return your json as a string you can send.

  • In the second event on keyboard s pressed (don't crop out the event numbers in the future), you don't pick any Enemies object. So you don't specify a target to move to, even though you saved the correct UID in the overlap event (no sub event needed here by the way).

    In the conditions, add an Enemies - pick by UID PlayerBox1.ATKTargetX and it should work.

  • Found an old example I had made before and updated it a bit.

    dropbox.com/s/hqld8aj1we5h0yy/TiledPathfindingExample.c3p

  • If you have the menu and player in a container, they will be picked with each other. Then you can keep the menu pinned on the player, and toggle it's visibility when you need it.

  • The array expression Array.AsJSON will give you the array as a string in JSON format.

    I'm not familiar with uploading to a server. Depends what kind of server you are using. If the array isn't too large I imagine you could use a POST link to a php page with AJAX object, and the server can save it to a mysql db.

    Or if you're using something like firebase the plugin can probably send data directly.

  • For x from 0 to (array.width-1)

    Array.At((array.width-1)-loopindex) would go from back to front.

  • Would it be reasonable to group all triggered conditions at the top when selecting conditions?

    I think it is fairly safe to say that best practice involves all events being triggered whenever possible, so this change would put emphasis on using triggers.

    Also, once a trigger is added to an event, other triggers no longer appear on the list. By grouping them together, the relative position of the remaining non-trigger conditions gets preserved and is more consistent. Sometimes I'm scanning down one side the list for a particular condition, but it was actually on the other side because the position changed after triggers are removed.

    It would also be more obvious that triggers have been removed from the list.

    This probably falls into the lots of work for little benefit category, but just wanted to throw it out here for discussion and see if it might have negative impact to workflow for others that I didn't think of.

  • Alternatively, clamp(0,self.x,960) should result in the same thing for this case.

  • On trigger-Tween value between 0 and 100 over x seconds

    While tween is running, set css opacity to object.tween.value.

    Or maybe it was 0 to 255, I forgot the range for opacity/alpha in css.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The text input object is an html element and doesn't play by the same rules as normal objects.

    You can achieve the desired result by styling the text box with css. There is an opacity property in css you can adjust by utilizing tween - value with it.

    Or you can make your own text input.

    construct.net/en/tutorials/own-textbox-459