PabloDev's Forum Posts

  • What does the bug is closed mean?

    It takes me about 5/10 min. Write a report, I do not speak English and I use the translator and I must make sure it is understandable.

    I'm not going to re-create a report just because the capx did not work.

    I am willing to upload another capx to this same report only if you tell me you will review it but I will not create a new report just because the capx did not work.

  • I like C2, events and editor, it is easy to work with them but when I finish my current project, then I will change engine.

  • EDIT

    Ok, I'll use a row in an array to indicate the type of object to create.

    So:

    Column 0 object type

    Column 1 object state in JSON

    ---------------------------------------------

    Hello, I have saved the state of an object in JSON, now I want to query the value of a variable in the JSON string.

    How do I query the value of a variable in a JSON string?

    I need to create objects from JSON strings, so to know which object I have to create from a string, I need to query the value of an object variable that indicates what kind of object it is.

    I have seen that C2 does not save the object type when using "AsJSON".

    It only saves the state of the object but does not indicate what kind of object it is.

    At least it does not in a text variable that indicates the name of the type of object as "Tilemap" or "Sprite"

    Here you can see that there is no variable with the name of the type of the object.

    So if I give you that information in JSON and I say "you must create an object in that state", you will not know what kind of object you should create.

    So my question, I need to query the value of an object variable that I will use to indicate the type of object that I must create from a JSON string.

  • I know that JSON does not save graphics, that answer does not work.

  • Hi.

    https://www.dropbox.com/s/rdzewts23g750o8/testTilemap.capx?dl=0

    In this example:

    1 - The tileset of the tilemap object is changed.

    2 - The state of the tilemap object is saved in JSON

    3 - The tileset of the tilemap object is changed again

    4 - Retrieve tilemap object status with JSON

    5 - The tileset that now has the tilemap object does not correspond to the one that was in the moment in which its state was saved.

    To take the test:

    1 - Press the space bar to change the tileet of the tilemap object

    2 - Press the "S" key to save the state of the tilemap object in JSON

    3 - Press the "M" key to change the tileset of the tilemap again, this is so that when the status is restored in the next step, the correct tileset that the object was in the moment of saving its state is visible.

    4 - Press "L" to load the state of the tilemap object in JSON format

    It is observed that the tileset of the tilemap object has not changed and the one that it has does not correspond with the one that was in the moment of saving its state in JSON

    Summary

    The tilemap object does not correctly store its state in JSON.

    The tilemap object does not retrieve its JSON state correctly.

  • EDIT

    Ok, the solution is to use an array

    -----------------------------------------------------

    Hello, I need to group the data of different objects (sprite object, tilemap object, etc ...) into the same variable to save that data to a single file on disk.

    Then, this works, it recovers the state:

    But if I add the data of another object to the same variable, then it does not work and the state is not recovered.

    Can you do that? I mean, save the states of different objects in the same variable to save the data to a single file on disk.

    https://www.dropbox.com/s/9eev9phqelypb5s/datosJson.capx?dl=0

  • Hi, I took the object by pressing A but the screen went black and nothing happened.

  • the Mnk

    I'm not really making examples as of late, but two ways come to mind:

    1.

    you could make a second paster and set that to the size you want, then position that over the part of the tilemap you want, paste the tilemap, then paste that paster to the other one.

    2.

    another idea is to utilize the draw quad actions. You define the four corners, and the uv's of them of the texture of some object. More math to figure out beforehand is needed for this, and it would only work if you can grab the tilemap's texture, I don't think you can though.

    Hopefully that can give some idea's. I haven't verified any of it so I may be off here and there.

    Thanks R0J0 I will do the tests soon.

  • In this recent E3 2017 my game (WIP) has been presented by Phil Spencer exclusive for XBOX, people applauded like never before and everyone said they expect the premiere !.

    It's a joke, it's a photoshop montage but the screen is real of my game!

  • Hello, a question, is it possible to paste a tile of a tilemap object on the canvas ?.

    For example, I have a 64x64 image and I want to use paster to paste an area of that image that occupies 16x16, I do not want to paste the complete 64x64 image.

    Paster does not allow me to choose the area of origin that will be pasted in the canvas, paster simply paste objects or URI images but it does not allow to define the size of the source area (in this case it will be 16x16 of a 64x64 image) that will be pasted in the Canvas.

    I would like to define:

    X1 (x origin)

    Y1 (y origin)

    X2 (width)

    Y2 (high)

    So I would do, for example:

    X1 = 16

    Y1 = 16

    X2 = 32

    Y2 = 32

    That is a 16x16 tile contained in the tileset of the tilemap object image, I select the area (which in this case would be a 16x16 tile) that I want to paste onto the canvas.

    I hope you understand what I mean because English is not my mother tongue.

  • Ok, I get it, thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, why when importing a sound in ogg format the editor does not create the m4a file ?.

    However, if you import in WAV format, the editor transforms the file into ogg and also creates the m4a file.

  • Hello, I find this behavior very useful for my project but I see something happening:

    Is this solved or do you intend to solve it?

    That is, should not you choose the shortest route without making those changes on the route?

  • Thank you, that's another way to do it.

    So why does not my example work?

  • Thanks, I did not understand very well but I think I have a solution.