brushfe's Forum Posts

  • 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!

  • 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:

  • Thanks lionz! This has helped a ton, and I've just adapted it to use timers (so I can pause the game mid-shake).

    And DiegoM, it was really helpful thinking about it as a behaviour, and making sure it could fit any object in the family.

    Cheers to you both!

  • Your confidence in my abilities is much appreciated! :) It sounds like you're right, but coding a plug-in is too far above my programming pay grade.

    I imagine it's possible with tweens or timers, but as you say it seems like a much more elegant (and I'd hoped, event-based) solution exists.

    Though maybe someone with more power than I could accomplish your idea!

  • The goal is to temporarily shake a sprite, by just a few pixels, for a short amount of time.

    One example is how old beat-em-ups would shake a sprite on impact (seen here in Final Fight)

    There are some old forum links about it, but I couldn't find a concrete answer that didn't include a plugin.

    Thanks for any advice!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had the same trouble finding this!

    It's a strange place to put to options. I can't think of any other application (or part of Construct?) that puts options next to the Close Window button.

    Could the three-dot menu be moved to the toolbar, with all the other buttons? Maybe to the left of the preview button?

    EDIT: Or just leave it where it was?

  • You do not have permission to view this post

  • You do not have permission to view this post