Mylon's Forum Posts

  • Create Object: At the time of object creation, it doesn't have a height or width. Using a sprite's size is not effective when creating it relative to other objects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Example: I have a button that creates a window on layer "UI". I have a sprite that reveals an object on layer "Game" (below UI layer) when mouseovered. If the window is over the sprite, mousing over the sprite will reveal that object above the window. Thus, I'll see a random object obstructing my UI layer.

    Example: I made a simple camera control setting based on clicking over the map and dragging. If I click this window and try to move it, I also trigger the camera function because the mouse is over the map, even though the window is in the way.

    Example: I have a button that creates this window. I also allow the same button to destroy the window. If I move the window over the button to hide it, then click the button, the button still counts as clicked and destroys the window.

  • Better documentation is always a good thing. I just want to leave some notes here as I see them

    Mouse: scirra.com/manual/114/mouse

    Set cursor from sprite: An instance of the sprite must exist on the layout where this call is made.

  • Yeah, I'm trying to make a game that's gonna be RPGish and will require a lot of UI elements and that has become a very frustrating part of development.

  • I would like to be able to use isometric/hex tiles, specifically ones with a "height" to them, thus needing some overlap to hide the Z portion of the tiles under most circumstances. Examples here: opengameart.org/content/hexagon-tiles-93x and opengameart.org/content/isometric-city

    I attempted to write a plugin to provide this functionality myself but I was told that the engine has a limitation where UI is limited to only the official plugins and thus my copy of the tilemap plugin would not work even when I changed nothing but the plugin name and ID. If you can add this feature to the engine I would appreciate it.

  • Is there a way to create a plugin that modifies the way the tilemap object is drawn? I don't want to risk having to maintain a fork of the official plugin.

    I can achieve the results I want by using a separate tilemap for each row of tiles, but I figure this may cause headaches in the long run as I will need a function to translate Y coords to reference separate objects. And if I want to add a Z coord (because the tiles can be stacked) then it gets even trickier.

  • Okay, so I'm trying to write a variation of the tilemap plugin to enable hexagonal tiles, plus tiles that have a z-height (I just need to add an input field to allow overlap) except that I'm running into a very strange problem: I am unable to to copy paste the plugin to even create a test bed to start with. Construct 2 crashes when I load the addon.

    The steps I went through:

    • Copy tilemap folder in plugins
    • Edit edittime.js to change the name and ID
    • Edit runtime.js to change all three instances of "cr.plugins_.ID" to use the new ID
    • Launch Construct 2, create a new layout
    • Attempt to add Tilemap Copy to the layout.
    • The default tilemap image displays
    • Construct 2 stops responding

    What do I need to do to get a second version of the tilemap plugin working so I can start fiddling with it?

  • You can copy-paste the sprite to create more instances of it that will retain existing behavior like collision detection.

  • I don't quite understand your expressions. Did you mean

    System -> On Layout Start -> Tilemap -> Set tile(Tilemap.PositionToTileX(x), Tilemap.PositionToTileY(y)) to tile Z? But that wouldn't allow placing tiles "inbetween" the normal grid.

    Did you mean placing individual sprites?

  • I have spent a great deal of time building a scrollbox so I can display an indefinitely long list of content. That wasn't easy. You can find the mostly working version here: if you want to see how I did it.

  • Assuming you don't need anything else going on, you can make these pages as separate layouts with their own camera controls.

  • I guess I'll have to make several copies of the tilemap object to get it to layer properly and do the X offset every other row.

  • Is it possible to use hexes (like opengameart.org/content/hexagon-tiles-93x ) in a tilemap? I tried using a negative Y spacing to try and get the tiles to overlap but it doesn't have any effect.

    I suppose I could build the map by placing tiles with math. But I want to know what's the best way (development speed, memory usage) to do this.

  • Grouping your events and activating/disabling them sounds like exactly what you're after.

  • There is no simple way to solve this problem. If you really want to rely on the collision engine to rotate these gears then you should make a circle and the pin a bunch of rectangles to it using some math to place them around the circumference evenly. Then use more math to make sure the teeth are of a sufficient size as not to jam.

    Either way you'll need math and programming.