brushfe's Forum Posts

  • Thank you! I'll try these out! I suppose I could also cheat each sprite by drawing it 1:1 and then setting its width 2x.

    I really appreciate it!

  • (I haven't experimented too much here, sorry if this is an obvious thing!)

    The AGI engine for 1980s Sierra games was at a 2:1 pixel ratio for the art, and 1:1 for the text and UI.

    The benefit I'm keen on is that it allowed for graphics to be drawn at 1:1, and all layouts to be designed at 1:1, and then only scaled the graphics in-game.

    I was wondering if this is possible in Construct? (and if there's a device-flexible way of doing so?)

    Thank you!

  • Mario games handled it by checking the vertical velocity of Mario when hitting the enemy.

    Mario collides with enemy

    Mario y velocity >0

    — kill enemy

    Mario collides with enemy

    Mario y velocity <=0

    — kill Mario

    That's a much better solution! Thanks for sharing that!

  • I think it's easier to determine if the player's position when they collide with the hitbox.

    For example, if their Y coordinate is less than the enemy's top edge, that means they're beside our below it, and should get hit.

    Otherwise, the player is above the enemy, and can stomp on them.

  • Jeepers, this is incredible! Thanks a million for such a detailed and helpful explanation. I hope there's a way for other new learners to find this!

    This has really clarified a lot of questions and I'm super excited to get into it now. Thanks again, truly!

  • I've been out of the loop with 3D, but I'd love to try it out - I just don't know where to start.

    There's some great example projects, but perhaps there's some tutorials or videos I should watch first to get the basics?

    The structure I have in mind is like the old MYST games, but with simple geometry - so a stationary camera with interactive elements and hotspots that let you move around the room.

    Thanks for any newbie guidance!

  • The clamp expression be helpful - it should let you limit the head's angle to the body's angle +/- some degrees.

    Something like: Set angle Head -> clamp(Head.angle, Body.angle - 10, Body.angle + 10)

    I might have this wrong, so check out the manual entry for more detail!

  • I think this is (still) not possible, though I know it's been requested many times over the years. It's definitely a core function that should exist, IMO.

    Unless I have it wrong, it looks like this has fallen off the list of feature requests with the shift to github. You should make a request there:

    github.com/Scirra/Construct-feature-requests/issues

  • It worked out!

    FWIW, I've also made a feature request for a non-JS version of this, in case any other non-coders would benefit from it.

    github.com/Scirra/Construct-feature-requests/issues/234

    Thank you both for the help and the JS crash course!

  • Thank you dop2000 and WackyToaster!

    I've tried both options here, but sadly neither are finding the animation.

    If you're interested, this is just the code I'm trying to use (both of your versions are here)

    drive.google.com/file/d/1uKcTWuydB0eFgoSZwgQ6uan-_foEcezp/view

    I think I've made a code mistake with getInstanceByUid(varUID), because it's returning errors in the console.

    This is likely all my error as I learn to use JS here, so if you see anything that could help, I'm all ears. Thank you again!

  • Right! I've got it integrated into the event sheet, but I can't yet get it to find the animations. I'll keep at it, thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks very much dop2000!

    Is there a way to use this code (or any JS) as a condition? I'm new to JS in Construct, and I can only find a way to use JS as an actions.

  • Oh I see, my misunderstanding. I didn't realize the template's z-order wasn't maintained in replicas, that makes total sense!

  • Is this the kind of thing that could be solved by dynamically-created global layers appearing just as they look in the editor?

    If this was possible, could you make a global layer for tilemaps, monsters, etc., and then spawn the layers to create a room?

    There's a feature request about this here:

    github.com/Scirra/Construct-feature-requests/issues/84

  • I have a family of sprites that have some shared animations, and also some unique animations.

    Is there a way to check if a sprite has a particular animation? (so that I can do something else if it doesn't?)

    There doesn't seem to be any sprite object conditions, but maybe there's something in JS or otherwise?

    (The current workaround is a web of variables to keep track of which sprite has which animations, which I must be doing wrong!)

    Thanks for any guidance!

    Tagged: