Selected instance ALWAYS draw 'X' pixels outline around their shape ?

0 favourites
  • 8 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • Hello All,

    I found a much more appealing look to my selected objects which I drag and drop, resize, rotate, change Z-Order etc.. all over the screen.

    So I know what I want it to look like I even have a working example (kind off..) but it's obviously not the best solution for what I'm trying to do and I'll explain why:

    When the Mouse is over the "Created_Objects" (family that contain ALL OBJECTS the user will create) I want a 2 pixels colored outline to appear around the object.

    So far so good, since my brain is just a simple logical one not like a programmer my first idea was to make extra animation for each object so it will have the 2 pixels around it on the same frame number.

    The problems:

    1 - Since each object contains 1 main animation with MANY VARIATIONS, each frame is a different variation.

    I will need to DUPLICATE the animation, and every time I will add a new variation to the main animation I will have to manually duplicate it to the duplicate animation which I called: "Selected".

    2 - I actually need to DRAW that line around each frame, or even if I use automatic filer to do it, it's a never-ending process because I'm about to keep adding more and more frames to the main animation.

    3 - When Resize the instance, the MANUALLY DRAWN outline will also change it's size.

    I would like the outline around the instance shape to stay the same amount of pixels ALWAYS.

    So if it's 2 pixels, or 4, so I can choose and change it if I want.

    4 - Duplicate each Animation and it's frame to the "Selected" Animation with same amount of frames but drawn with the Outline Edge will take DOUBLE the space which will make the software bigger and bigger as I'll keep update it.

    The Question:

    Is this possible to do with simple code? or it is very complicated and I rather

    Maybe a specific Effect that can do this, I didn't found something beside BlurH and BlurV which isn't exactly what I'm looking for since it's... blurry, looks like glow unlike the SIMPLE effect I show on my example attached file.

    What do you think? simple solution that even a noob like me can use? or waste of time to do in C3 without confusing code that I won't be able to follow (again, I'm not a programmer, just an animator).

    DOWNLOAD - Not Finished EXAMPLE C3 File

    Please share your ideas, suggestions, solutions.

    Thanks ahead! :)

  • construct.net/en/make-games/addons/265/outline

    You would just put those instancs on a layout with the effect.

  • construct.net/en/make-games/addons/265/outline

    You would just put those instancs on a layout with the effect.

    Thanks newt it's very useful!

    Unfortunately when resize, it will resize the outline as well and get very pixelish / blurry.

    That was what I've described on issue #3 but this effect sure make things much easier!

    I'm looking for a way to keep the outline with the same ratio (2 pixels for example), no matter if the object resize, change rotation or any other tweak.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can apply the fx to the objects, but you need a large alpha border, and it costs more computationally.

  • I just applied it to the all family so it will work on any instance of any object.

    I don't really know how to do what you've suggested but if it takes more CPU or Memory... it won't be very good for many MANY objects on the screen I guess.

    Is there another way to "DRAW" an outline around any instance using the same pixel ratio / size?

  • Not unless you use different layers.

  • Not unless you use different layers.

    Yeah, I guess there is no other light solution to this, but thanks for helping I appreciate it! :)

  • > Not unless you use different layers.

    Yeah, I guess there is no other light solution to this, but thanks for helping I appreciate it! :)

    You could make it so each object has a slightly bigger, different color copy of itself behind itself that scales/rotates/etc along with it. This would look like an outline as long as the opacity of the main Object doesnt go less than 100

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