LeoSantos's Recent Forum Activity

  • Hi, this is my first post in... years. The lack of better sprite support in C2 was one of the roadblocks that made me stop using it, despite liking everything else (the lack of a scene graph with true hierarchies, essential for complex projects, was the other factor... but that's off topic).

    To me, the main problems with sprites in Construct are:

    • Reimporting updated sprites is really essential, not just a bonus feature. A way to re-import the frames without losing all the work put into colliders, animations, etc, would be great.
    • Defining the animations by loading all frames, then deleting the ones you don't want is super cumbersome from a UI design perspective. What if you delete unused frames for the first animation, then create a second? Import it all again and delete the ones you don't want again? What if you have a sprite with dozens of actions? You should be able to import the frames only once.

    Bottom line is, you should be able to decouple a sprite from its bitmaps (animations, in this case, would be essentially lists of frame numbers plus attributes like loop, frame rate, etc.) , and simply load any spritesheet you want "into" a sprite.

    Cheers.

  • I figured a way to do this, but had to use two timers (a short one for object generation, a long one to stop generating objects).

    Being able to access the offset would be much easier. Since the offset is only used when the object is created, maybe a "Reset" method could force the offset to be read at any point in the game?

    Here's a little example, using timers instead of the offset:

    leosantos.com/storage/test/example/index.html

  • +1 on This.

    I'm generating strings of objects on the fly, and they're supposed to have a "snake like" motion, with the same exact parameters (magnitude and period needs to be the exact same one on all objects in a group) but with a time offset. Without access to the "offset" parameter I can't figure out a good way to do it.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That worked brilliantly.

    For some reason, I thought families were just used to group objects by "function", didn't think of it as a way to apply the same behavior. Now I know.

    Thanks!

  • Hi,

    I've been searching the manual and the forums, but can't find a good solution for object hierarchies.

    What I want is this: If I make a container object, I'd like its "children" to move automatically when the container moves, but still be able to have "local" movement. Using "Pin" doesn't work, because it locks the trasforms of the children objects completely, and simply adding children to a container doesn't work either (they don't inherit the transforms).

    This is a really basic feature, and I was surprised Construct doesn't have it, since hierarchies can be used for so much more than the moving things around, you can organize very complex projects, use it to optimize performance, etc.

    But maybe I'm mistaken and there's a way to do it? Fingers crossed! :-)

  • I don't have my computer around right now, but maybe the issue is that I'm not updating every tick? The sprite objects containing the characters are created at the start of layout only, for performance reasons.

    I'll try what Telles0808 suggested and update it on every tick... but I really think it shouldn't matter, you should always get the post-cropped size using .ImageWidth regardless of when.

    Thanks!

    Leo.

  • Yes, but ".ImageWidth" seems to only return the width of the first animation frame. I need it to return the width of an arbitrary frame within the animation, or even the last frame used.

    I'm assuming it can't be done, unless someone writes a plugin :-(

    Thanks!

  • Hi,

    How do i get a sprite frame's cropped size? I know I can get the object size (.Width) and the original sprite size (.ImageWidth), but I need to get the real, current frame's width after it's been cropped in the editor.

    (In case you're wondering why, I'm using it for a variable spacing bitmap font. Should be really easy if there's a way to get that value per frame).

    Thanks!

    Leo.

  • +1 on this request!

    Find doesn't seem to be case sensitive, which turns out to be a problem when you try to create a bitmap font system that has both upper and lower caps.

    Thanks!

LeoSantos's avatar

LeoSantos

Member since 27 Oct, 2011

None one is following LeoSantos yet!

Connect with LeoSantos

Trophy Case

  • 13-Year Club

Progress

13/44
How to earn trophies