the_procrastinator's Recent Forum Activity

  • I'd like to know how to I make a separate sprite mask for enemies/player characters to appear to be burning. Like an overlay with various looping fire embers that only show accross the character's sprite.

    eg.: when an enemy catches on fire on Enter the Gungeon.

    I know how to attach it and such; just need to know which effect/blend mode to use in both sprites to make it look right.

  • Actually, nvm. Found a solution already.

    But thanks for the reply anyways, tho.

  • Oh yeah, thanks for the suggestion. But already knew about this way.

    The pick condition, sadly only works for the tilemaps themselves, and not the tiles.

    You see, the problem is: If there's a taller object (like the boss, for example), it'll probably surpass the lower walls height and get blocked by upperwalls in the head. That's why I went for the supposedly cleaner solution - to change the character's layer itself, so it'll always be in the foreground whenever it's nearest to a lower wall object.

  • Trying to make the character object go to either a front or a back layer in relation to the walls/roof in the top down perspective of my game; to give the illusion that the characters are actually "in front of" or "behind" these walls - something pretty necessary for such kind of game.

    However, I don't know if I understood the tiles expressions from the Tilemap object right, but IMO they seem to be rather limited in terms of precision and control of WHICH tiles you're picking in relation to some object's position.

    Here's when the player is behind the wall, working properly:

    However, things change when he's in front of it. His head will get underneath the front wall until he crosses through like half of it (2 32x32 tiles height wall).

    Here's when his head will appear underneath it:

    (AnimationSprites is the family of all character sprites)

    I'd like to know a way to sort it out in a way that this "effect" doesn't happens; as it's (in my knowledge) because the SnapY function will choose only the nearest tile Y avaliable, and not take X into account.

    Already tried dozens of different combinations of the PositionToTileX,Y, TileToPosition expression and so on; so far no good.

    I mean, if there's a way, that is. If there's not then I'd like to request a more precise way to pick tiles based on a X,Y point.

    And here's when it actually gets in front of it (halfway through the wall's height)

    The event block used to sort it out:

  • Huh, that's actually a pretty interesting way to do it. Thanks a lot!

    And even better, you can put stuff both beneath and underneath the mask, as long it isn't in the same layer below its z order, which is great! (and I didn't know bout that as well).

    With a little tweaks here and there, I can see it working in an in-game pop up menu, so that solves my question. Again, thank you very much

    Also liked the gradient opacity effect, very interesting looking

  • Thanks for the reply!

    Would you know which is the best blend mode setup for masking such a menu? One that does not wastes too much free space (and is suitable for an in-game pop-up menu).

    Best solution I could find so far would be to "cut" the sprites, but sadly, this wouldn't work for an in-game menu, I suppose.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, after lots of search, the best examples are could find are extremely limited. Every single scrolling menu tutorial online I could find for Construct limits the edges of the scrolling menu to the layout itself (or by placing a "frame" 1 layer above it). However, those ways can get pretty clunky when you have, for example, a scrolling bar inside an in-game pop-menu (Enter the Gungeon's pause menu->key biding, for example; or Terraria's bestiary). Already tried messing with blend modes, and so far, I couldn't get anything close to these 2 examples.

    Best solution I could find so far would be to put 2 "frames" upside and below the scrolling objects, and set them invisible once they completely enter those frames (so they keep scrolling above and below and cannot be seen outside of the scrolling menu area). Still pretty limited tho.

    Does anyone knows a better way? To make it work like it does in other games? (without the need of these artificial frames, or without having to "cut" the menu sprites a hole to include the scrolling elements inside them)

  • Update: Oh my god, that's it, it worked

    Thanks a lot lol, couldn't find this anywhere else.

    When my game launches, I'll give it to you for free if you want it; cause srsly, lost almost a whole week of progress to this issue.

  • Hmmm interesting, never thought of using it that way.

    Thanks, gonna try it out later

  • My current workaround is to keep increasing the line's width until it overlaps the crosshair. But it's not quite as fast nor performance friendly as it could be.

  • I'm struggling to figure out how to measure the distance in between 2 points (the first on a layer with 100%x100% parallax, the second on a layer with 0%x0% parallax).

    The second point represents the gamepad's crosshair for my game, while the first one represents the gun (for setting the width of lasers, scopes and such).

    Obviously, simply setting the width to distance(point1x,point1y,point2x,point2y) doesn't works

    Already tried several ways, including making a function that returns numbers; with equations including scrollx and scrolly (and dividing both positions by the viewport's height/width) - came kinda close to it, but couldn't find why it doesn't works sometimes.

    Help would be greatly appreciated

  • You don't need to use that "for each" statement inside of the player collision w/ ore block tho.

    It's redundant a may drop performance a little bit.

    Another tip is to set the "update" block to trigger at every 0.1 seconds. It'll help to alleviate the cpu load whenever there are many objects present.

    You might wanna start to use families for the minimap icons and objects as well, since it may start to get a bit messy the larger your project grows.

the_procrastinator's avatar

the_procrastinator

Member since 31 Jul, 2019

None one is following the_procrastinator yet!

Connect with the_procrastinator

Trophy Case

  • 5-Year Club
  • Entrepreneur Sold something in the asset store
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies