brushfe's Forum Posts

  • You're right, it should be a simple process of breaking it down! I think i've just made a mess of it enough times that I'm convinced I'll never get it settled!

    The biggest thing I'm noticing is a lot of jank and jittery scrolling; I think it's because the camera is struggling to keep up? Or maybe it's unrelated, like browser-based screen tearing? I don't know how to tell the difference, so I'm assuming it's my code!

    The second failure has been keeping locked to the player, but letting them move around within the camera's bounding box without the camera moving.

    I've tried different methods: attaching/unattaching the camera box as a child; using a lerp with high interpolation (to remove the drift); moving the camera at the player's velocity/angle; and I've not been able to make it smooth.

    Just for posterity I've included the sketches I'm working out, but this totally feels like something three lines of code will fix once the correct method is identified.

  • I have a version of this, but it's messy and glitchy, and I'm certain I'm overthinking it.

    Super Metroid has a camera that lets players move inside a box area, without the camera moving. Only when the player moves beyond the border does it start to track along.

    I've tried this with one scroll-to object, but maybe it's better to use two? I'm not sure. The stages in this game are either horizontal-only, vertical-only, or open movement, so maybe it needs three cameras? The player is a basic platform object, if that's important.

    There is a quick breakdown of this type of camera here, but I imagine it's popular in many 2D games.

    suppressivefiregames.tumblr.com/post/85891843723/an-analysis-of-super-metroids-camera-code-and-using

    Thank you for any guidance!

  • Ok good! So what's the error you're seeing? You might have to share your project, that's usually faster to get another opinion.

  • What type of variable is your "number" instance variable?

    If it's a number, and you're trying to set it to a string ("left" or "right"), that will cause trouble.

  • True, which can be used at the start and if you have everything perfectly planned out, but it doesn't help much after that for adjustments beyond that. And that's only if the imagepoints are the same for the every animation.

    Personally I just think there's not much point in having imagepoints visible one at a time. Editing them, copying them, referring back to, etc all get easier when they're all viewed at once.

  • I'd love this feature personally. I use many image points on a variety of sprites for armor skins and weapon animations, over many characters.

    Sometimes I need to quickly see if one image point is off compared to another, or to compare multiple image points on different animations (this is particularly tedious). Other times I need to see if I've forgotten to set an image point, and have to click through them all to find the culprit (again, tedious at the scale of animations in this project).

    I think a tickbox option in the toolbar to show all, that stays enabled/disabled as you click different animations, would be really helpful.

    Or even have them all always visible when in the image point tool, and move them as you like. Selecting an image point from the list would hide/dim the others.

  • That's the system action "is between values"

  • That's the kind of thing you can get from Google faster than a forum. Just search for your question and you'll get the answer!

  • I'm not sure how you're using LOS, or how it affects your enemy movement. I would just keep experimenting until it's behaving the way you'd like it to!

  • Try something like this, just to see what BBox is like. It uses char.BBoxLeft and char.BBoxRight, rather than char.X, as the point of comparison. There's also a Margin number if you want to customize the distance even more. And it separates the mirror from the follow movement.

  • It's a built-in property of the Sprite object.

    Sprite.BBoxLeft, for example, returns the X value of the left edge of your sprite.

    Definitely look up the Sprite object in the Construct manual, it'll give you more info (I highly recommend reading the manual whenever you can, it's really great)

  • As lionz said, you're checking whether your enemy is either left or right of a very specific coordinate (the player's X). Your enemy will still move even when they're overlapping, because you've told them to keep moving at all times, either left or right

    If you want enemies to do nothing when they're overlapping, you have to change when you tell them to stop moving.

    Try using the edges of the player's sprite instead of X. You can use the BBox property (bounding box) instead. And add an else statement to make it a little neater.

    If Enemy.X is greater than Char.BBoxRight

    ...Enemy simulate moving left

    Else

    If Enemy.X is less than Char.BBoxLeft

    ...Enemy simulate moving right

  • You can also combine these into one condition:

    • For each Sprite

    • Sprite -> On Frame Changed

    • Sprite -> Frame = 2

    • Sprite -> Is "Shooting" playing

    This will create one bullet whenever any Sprite object playing "Shoot" animation changes to frame 2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Personally I think the indicator of whether a layer is global or not should just always be a little globe icon in the editor. In that way nobody gets confused between global/overridden and it doesn't affect the naming in anyway.

    Or even simpler, just change the text colour of global layers in the layers window. Globals=green, Normal Layers=grey

    I really like the little icon idea! It would leave a lot more room for layer names in the menu, and is very a clear answer to the debate above. Colours can get tricky with visual impairment, so I'd certainly vote for that!

  • A "Has Animation" condition for Sprites would be so useful!