PabloDev's Forum Posts

  • Hi, can anyone explain?

    This formula works with an object, but if you have two objects then the second object escapes, why ?.

    https://www.dropbox.com/sh/ehrch6zye1tuq33/AACqlv_6UnWbOaJSLhy8n3Era?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, I realized I was doing something silly there.

    Thank you!.

    : D

  • Hi, I think this is not normal. C2 its a troll?.

    When I choose an object to replace and pulse OK, then it automatically opens the window again and will not let me finish.

    Is it a bug?

    Hello, I am trying to open a project of mine but the message appears:

    "Some features will be unavailable" and some errors happens.

    I would like to know what are the functions that can not be used in free edition.

  • I think this is the thread but it is inaccessible for me:

    https://www.scirra.com/forum/viewtopic.php?f=192&t=189430&p=1110820#p1110820

    They have locked in there and do not want to open us.

    So this is like knocking on the door.

    If someone brings a battering ram we may have access to beta.

    It can be seen on Ashley's profile.

  • I also want to add, why can not you check the background color of a layer?

    Color can be set, but can not be checked.

  • You can do that by also having a blank sprite load the tilemap image. Then you can get the sprite's height/width to get those values.

    A strange way to check those values but it seems that there is no other way, thanks again !.

  • What C2 is calling "a new tilemap image" is indeed a tileset.

    Here's an example of how you load different tilesets:

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

    Each tileset is a separate image. You can check them in the Files folder in the Project Tree.

    Edit: Keep in mind that changing the tile width/height in runtime is impossible, though.

    Perfect, then I was wrong, I simply did not know that function and I thought it was just a map load, not a TILESET, I was also confused that the action is called "Load image from URL". I thought it was about uploading a new map from the network by connecting to a web or some server or something.

    Thanks !, this eliminates some problems in my game.

    On the width and the height, I only need to consult it, I do not need to change it.

    Is it possible to consult the values ?.

    I do not know how to check the width and height of a tileset.

  • I think I understand what you want, but you cannot do that.

    You want 2 instances of the same tilemap object to have a complete set of different images in them, right?

    That's impossible. The minute you change the tile images, all instances of that object will have the new images. Instances are just a copy of the object that are allowed to have different variable values, like height and such, but not images.

    TILESET can not be changed.

    Even if you only have one tilemap object.

    It can not.

    I only have one tilemap object, I do not need any more tilemap objects and I can not change their tileset.

  • Oh, you can just save it to json and then load from json.

    Yes, that is true but only the TILEMAP, you can not load a new TILESET in any way.

  • You can load an image from url into the tilemap, but you can't have 2 instances of the same object with a different image, so 1 image per tilemap object.

    I understand but I think there is a bit of confusion, in DOC says this:

    Load image from URL

    Load a new tilemap image from a given URL. It is not used until the image has finished downloading, and On image URL loaded triggers. Images loaded from different domains are subject to the same cross-domain restrictions as AJAX requests - for more information see the section on cross-domain in the AJAX object. Data URIs can also be passed as an image, e.g. from a canvas snapshot or webcam image.

    In DOC talks about loading a TILEMAP image, but does not say anything about TILESET, the TILESET is the set of tiles that you will use to build the map with the tilemap object.

    I want to load a new TILESET in my TILEMAP object.

    I understand that you can not have two equal objects with different TILESETS.

    That's not a problem for me because I'm just going to have a single tilemap object.

    I want to change the TILESET of my tilemap object at runtime.

    But there is no action that is "Load new tileset" on the tilemap object.

    Load image from URL I think it only loads a new map for your tilemap object, but it does not load a new TILESET for the object.

    Maybe I'm wrong but I think it's not possible to load a new TILESET into a tilemap object, in fact, you can not access the properties (width and height) of the TILESET image loaded in a tilemap object.

  • When you create an object, any actions below that refer to that object, so maybe if you do something like:

    Start of layout ->

    create object Tilemap

    load tilemap

    create another object tilemap

    load second tilemap

    It should work. If you want better control over it you can just pick which tilemap you mean using IIDs. Something like:

    Start of level->

    Pick tilemap where tilemap.IID = 0 ->

    Load tilemap1

    Pick tilemap where tilemap.IID = 1 ->

    Load tilemap2

    I'm not sure I understand this, I just want to load a new TILESET (NOT TILEMAP) into a tilemap object.

    Then I do not understand ... what would help me what you say ?.

  • Hello, I have a tilemap object with its set of tiles.

    I would like to know if I can load a new set of tiles on that object and how should I do it ?.

    I do not want two different tilemap objects, I want to use the same object and for that I need to change their tiles according to the level the player plays.

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

    In another case, why can not I access the width and height of the TILESET loaded in the tilemap object?

  • Thanks for the information guys.

    Another thing you can do is add a wait 0 to give C2 a chance to update before running actions after the wait.

    Where should I add the WAIT(0) in the capx file I uploaded before?

  • In debug mode you can check how many instances there are of the bat sprite. Maybe there are -for some reason- 0 instances.

    Ok I've tried it, but I do not see any sense of what's happening.

    That is, the condition is true although in the debug it says that the object exists.

    I do not see sense.

    Try the test.

    When you press space, the text is printed.

    How is it possible?.

    That condition should be false because the object was created before, so sprite.count is not <= 0.