shinkan's Recent Forum Activity

  • You need to use Ajax plugin to load up the file.

    Ajax:Request project file and then Ajax:On completed set array to Ajax.LastData

  • Problem Description

    It's still not working as it should.

    Everything is practically the same as in last bug report

    https://www.scirra.com/forum/tilemap-tilemap-tilesjson-not-updating-properly_t148345

    When you save a file using Tilemap.TilesJSON or Tilemap.AsJSON "c2tilemap":"data" is saving correctly (all tile ids and states).

    But "width" and "height" in .TilesJSON and "w" and "h" in .AsJSON are not changing back when you scale down tilemap object which is messing up the placement of the tiles.

    This is the tilemap object

    c2tilemap: true, width: 5, height: 5, data: 6x-1,3x0,2x-1,3x0,2x-1,3x0,6x-1 (5x5 squares with tiles in the middle)

    Same tilemap object after adding some empty tiles to the right (scaling up the "width")

    c2tilemap: true, width: 9, height: 5, data: 10x-1,3x0,6x-1,3x0,6x-1,3x0,14x-1 (notice "width" have changed from 5 to 9)

    Now scaling this object down, back to 5x5 and saving it gives you this:

    c2tilemap: true, width: 9, height: 5, data: 6x-1,3x0,2x-1,3x0,2x-1,3x0,6x-1 - data is exactly the same as in first image, but width is still 9 instead of 5.

    And this is how it looks when you load it back to the 5x5 tilemap.

    All tiles placement is messed up and shifted. Most of the tiles are behind the edge of the Tilemap object, so you have to scale it up again to see rest of the tiles (image below).

    (This is how it looks fully when you add some more empty tiles around.)

    Same file

    https://dl.dropboxusercontent.com/u/343 ... pJSON.capx

  • Did you try posting this on INTEL forum, where people who made XDK can have look at this? This is not XDK support forums.

  • distance(First_Sprite.BBoxRight, First_Sprite.Y, Second_Sprite.BBoxLeft, Second_Sprite.Y)

    But i think you are overcomplicating this a bit

  • Same as Tokinsom here.

    As soon as I make the selection and release right mouse button C2 freezes for 2-4 seconds and then crashes (every time).

    Shift+right click on single tiles works normally.

    Win 8.1 x64

  • On sprite clicked -> set sound to 1-sound
                      -> set frame to sound
    [/code:1e4gy7ne]
    This will suffice to switch sound  on/off  and same time set proper animation frame to represent sound state.
  • You could easily wrap those 8 events in a function though, right?

    Not really, because you can't properly set a function parameter to proper tilestate.

    It's not a big issue or anything, it's just annoying that I need to make all of that while I could make just one event instead.

  • You can already access the tile state using the "Compare tile state at" condition.

    Yeah, but it's not helpfull if you want to fill an array with tiles and their states

    You need to make 8 event to get tilestates from each tile while retrieving data from Tilemap to Array and then make another 8 reversed events to send back data from array to Tilemap.

    i think I made my first statement not complete so let me rephrase that "there is no way to return the tile state from tilemap as expression"

    Like simple example: set variable to Tilemap.TileStateAt(TileX, TileY)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Lifesaver! Thank you.

  • Not a lot. Only occasionally when "job" require something more than C2 can handle.

  • I'm quite alright with that

    This rather will never change in C2... But I must say I like this kind of system, working per frame not per sheet. It makes placing image points really quick. You can make all your frames at certain size, import them, put your image point when you want and "apply to whole animation" and crop your frames.

    It's not that easy when you importing entire sprite sheet and have to manually "cut out" every part of the texture to be used as a frame.

    But with custom sprite sheets you can pack more images on one texture...

    Both methods have their pros and cons...

    That's the part i hate the most in UE4. You can press a button and all images will be automatically cut out... but then they all will have different sizes and placing image points on them after that is incredibly painful... Almost as using Image editor in C2 to copy/paste animations and animation frames xD

shinkan's avatar

shinkan

Early Adopter

Member since 21 Nov, 2008

Twitter
shinkan has 7 followers

Connect with shinkan

Trophy Case

  • 16-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

25/44
How to earn trophies