oosyrag's Forum Posts

  • There's nothing in there that creates a new Sprite4 line. You're just moving one around.

    Try this:

    Get rid of the function call in event 1

    Add a System - Create Object Sprite4 in event 2

    Copy all the actions from event 5 to event 2 after the Create Object action

    Move the System - Create Object Sprite in event 2 so that it is the final action in that event.

    You can get rid of the function I think. You can also combine events 1 and 2, no need for a subevent here.

  • First paste a color wheel onto a drawing canvas object. Then use the save snapshot action. Afterwards you can use the snapshot(rgba)at(x,y) expressions to get the color from any given pixel in number form, and do whatever you want with it.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas

    SnapshotRedAt(x, y)

    SnapshotGreenAt(x, y)

    SnapshotBlueAt(x, y)

    SnapshotAlphaAt(x, y)

    Return the red, green, blue and alpha components of a pixel in a saved snapshot. The position is given in pixel co-ordinates, and the returned value is returned in the 0-100 range. For more information see the section Pixel manipulation with snapshots above.

  • In event 5, create a text object with the fade behavior at enemy, and set text to damage amount.

  • You do not have permission to view this post

  • It's not that clear what you're asking for... What does your drawline() function look like?

    But if I had to make a guess it seems like you are not picking any instances of Sprite4 in event 2, so the new line and the existing ones get stacked on top of each other, looking like there is only one line.

    You need to specify which Sprite4 you want to apply actions to. Usually this is done automatically if there was a system-create object action in the same event, but in this case it looks like you create it via a function so the auto picking didn't apply.

  • Here's an example. You would replace the localstorage events with whatever your server uses.

    dropbox.com/s/3diz2xukc4732zg/LocalstorageSaveArrayExample.c3p

  • Exactly. Memorize, or rather the program will remember for you.

    Bonus you might not even need an ID field, since the x index of the array is basically an ID. Unless the ID field refers to an external number of some sort then you would still need to have it.

  • Use a object with the bullet behavior and enable gravity in the properties.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads