Is a crop behaviour possible?

  • Hi, all, especially Behaviour makers - I was wondering if a crop behaviour would be possible, i.e. is it possible to control the very basics of object drawing by kinda shifting the drawing rectangle, like this:

    [attachment=0:1j08gg3t][/attachment:1j08gg3t]

    I have my own use for something like this, but it would certainly be useful for all sorts of loading bars, liquids filling and such.

  • It just depends on where the hotspot is.

    As far as I know we don't have the ability to change it in the sdk.

  • Hmm, but if we were to assume it's hard-coded to top left?

  • A good test is: stick a sine behavior on a sprite with movement set to width.

    Preview that, then change the hotspot, preview again.

    It always grows from the hotspot.

  • I'm sorry newt I might be misunderstanding something, but the base idea - showing just a part of the sprite, but without shaders - is that possible? As a behaviour?

    If it comes from the hot spot that might actually be a bonus.

  • I guess technically could be possible (after all, a sprite is showing part of a spritesheet when you think about it), not sure that a behavior would do it however, I think more of an effect or a dedicated plugin for that use, not sure someone did one.

    alternatively, the paster plugin could work:you paste a part of the big image.

  • I agree, I'm thinking that Paster will be your friend to achieve this. You could either copy half of the sprite and show it on the Paster object, or you could paste the background onto the Paster object and then hide/reveal the sprite from underneath.

  • You can either change the size of the object and it will change based on where the hotspot is, or use one of the blend modes.

    For an occlusion like your first image its a dummy object with either blend mode, or an fx.

  • To make it clearer why I would need to split a sprite into half - it's for this project:

    Subscribe to Construct videos now

    - would enable having way more variety in the parts.

    As we can see the parts are rather overlaid, would a blend mode help to hide just half of the active sprite? I suspect not really... but then I'm no pro at blend modes.

  • I was thinking, from a plugin standpoint, you might be able to do that if you were able to change where the hotspot was.

    Im pretty sure we can't access that in the sdk.

    On the other hand:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks newt - that somewhat does what is needed, BUT it has no support for frames, which are rather integral to my approach... Well, I have added some GUI changes that let me add as many parts as needed, so that could help a little.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)