Alon's Forum Posts

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

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

  • Thanks for the example and explanation, to be honest it is scary for me how complex it will become as more as I'll use more actions (not just rotate and size) later on... so I need to think if I should use an UNDO / REDO system at all.

    The amazing thing is that I didn't even realize it is possible in C3, and to think that there are no actual limits so far (beside the fact that I'm not even close to understand how to program these yet) still very encouraging.

    I will have to see if I can.. or should actually apply this to my project because my original goal is to keep it simple, but I think some users will get upset if a basic function such as UNDO is not there.

    Once again, thank you so much dop2000 your help is always appreciated!

  • Thanks for the detailed reply, I appreciate it!

    So I created a clean example project so I can share here since my project is getting very complicated (especially for me as a noob), I do many mistakes and still can't solve many simple problems.

    the reason I prefer to use the SetColor is because I have extra control with the Alpha for opacity, but if it's not possible to use it I'll be happy to use the other option.

    As you can see I didn't solve the color selection in that project maybe you can help me out here.

    Also, I made a OFF-TOPIC point to show that what Ashley said:

    Note rgba takes values in the range 0-100, not 0-255. It's also fine to pass floats to these expressions - any rounding or clamping is done internally in the expression.

    Is not accurate at least on the current version and I wondered why it is not fixed on the expression tip that suggest 0-100 for every color while it is obviously 0-255 for RGB and 0-100 only for Alpha, this is how I'm used to it on animation software so it's great!

    File Example, as you can see I can SetColor from 0-255 for the RGB:

    File Test C3

    Back to the Original Issue:

    I hope you can help me out with the selection, my goal is that whenever you select or add selection to an object is to set a random color but unfortunately I'm not smart enough to solve this.

    Thanks ahead for any help!

  • Thanks Maverick1912 and Kyatric I tried to follow your instructions, but I get 99% of the selected objects the default color (which is Red for now).

    How can I make it more Random to select different colors and not mostly Red?

    BTW - I'm trying to make this work for mouse since I'm not using the touch object.

    My current test:

  • I don't know your layout structure. For this system to work, one instance of UNDO object should be present on all layouts where you need undo/redo.

    My layout structure is basically: ALL layouts in the projects included on "L_Workspace" beside that, the main events is the biggest event sheet called: "E_MANAGER". I guess I have no choice but to actually put all hundreds of my objects in the "L_Workspace" with the current system, the reason it worries me is that's BEFORE the user will add hundreds of items on the same layout while creating more and more.

    But if it's the only way to make this wonderful system to work, I'll put everything on "L_Workspace" of course.

    Applying: Angle / Size

    I'm trying my luck with Rotate / Resize to work with your UNDO / REDO system, I almost made it working but it's not working exactly... I'm trying to make sure it won't save on every tiny change but only when the specific action keys released, here is the current version:

    DOWNLOAD C3 Remake TEST

    It's a mess, I know... but that's not even close to how complex my project is so I try to practice on this much more cleaner project based on your system. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for founding the issue AllanR I scratched my head why it didn't work on my project!

    dop2000 the problem I need to solve is that it will be too many objects to put on the layout which I want to keep clean, this is why I made the "L_SPRITES" Layout to put all the objects I'll create there so I can see them organized and keep adding more and more.

    Is there a way I can still do that with the "L_SPRITES" maybe if I'll put the UNDO/REDO system on "L_SPRITES" event sheet (I need to create) + make the objects Global? I didn't tried it yet, but wondering if there is a solution to make it work when the objects are not actually on the "L_Workspace" layout.

    Any simple alternative solution to NOT put them on the "L_Workspace" ?

  • Hi dop2000 sorry to bother you again, but I had to see if it's just me or something is wrong with the "converting" from C2 functions to C3...

    So I delete EVERYTHING in my project but layers and some layouts to keep the same structure.

    And COPY/PAST your project from c2.

    When I did that CONVERT to built-in functions... I guess something went wrong because I get the exact same issue I had: NO UNDO when Ctrl+Z

    Can you please have a look? maybe it's a minor thing that can be fixed so I can actually use this on my project?

    Maybe there is still a hope for me:

    DOWNLOAD C2 converted to C3 Functions

  • Hi All,

    How do I set a random color for each objects?

    All objects are in one family: "Created_Objects"

    I want to code for the family so it will work for any other object and it's instances.

    I started with this, but of course it keep setting it forever (trigger once didn't do the job and also for each loop failed) so I need to make it work once, ONLY every time I select an instance:

    My unfinished try:

  • Yeah... I guess I broke it real bad, even that won't save the project.

    Maybe I should just make my software without UNDO/REDO (users will be pissed off for such primitive decision) but this event sheet is already huge and I will never find what goes wrong.

    Debug won't help me because I don't know what to look for anyway.

    Don't get me wrong dop2000 I appreciate your help a lot! (I tried to look for you on discord so I could show you the project via screenshare) but you're offline also probably offline.

    I'll see what I can do, messing around with it before I'll give up on such MUST feature.

  • When I try to replicate the code for the clear, C3 asking me for a value to clear the entire array with,

    I think in C2 it's just Clear, and since I'm super confused with Arrays anyway I don't even know what to type there so I put 0 for now (default).

    Anyway, here is the current mess (sorry about it) I tried to cut it to the problematic part, maybe your sharp eyes will get the problem why the UNDO/REDO system doesn't even work with CTRL+Z

    There will be very ugly things you'll see because I tried to follow your instructions (beside the CLEAR part for now because I don't know what value to type in)

    Sorry for the HUGE image, I'm out of ideas already...

    Anything that related to the Creation of the objects is on that GROUP but with the same code you made, it maybe not seen because I fold it for sake if how huge this event sheet is already.

  • I don't know your project and can't help you with this. Maybe when you preview with F5 the event sheet with Undo functions is not accessible (not included into layout's event sheet).

    .

    By the way, you probably need to initialize Undo (clear undo history) after you load ".alon" files.

    OH! I'm not sure but... the UNDO and other "SYSTEMS" are all in one dedicated layout called: "E_MANAGER"

    which included in the actual Layout I'm using, so far everything worked there but maybe the Undo won't because of that?

    Also can you please guide me how I clear the undo history for the load and also...

    Just an idea... maybe as soon as the Software start (f5) it will clean which probably doesn't make sense but worth a try?

  • Is it because you forgot to re-enable UNDO group? :)

    LOL.. no no, both are enabled :D

    I just tested the UNDO group without the SAVE group to stop getting this annoying automatic "Save As" that starts as soon as I test with F5

  • Do you have other "On save complete" or "On load complete" events in your project? Or an action like "Browser invoke download SaveStateJSON"? You'll need to add "isUndoSave not set" condition to those events.

    I guess yes, here is the screenshot of the SAVE / LOAD SYSTEM:

    But even if I disable this group, nothing related to Ctrl + Z works, what could it be?

  • The code on your screenshot is correct, that's exactly how it should be done. I don't know why are you getting "Save as" dialog, must be some other event.

    IT IS?? ok... I wasn't sure at all, that's a progress for me.

    So, just for testing if I disable the:

    Start of Layout > Functions | Call Undoinitialize

    The "Save As" issue won't appear... so I'm trying to look what I did wrong, and how to fix it.

    I don't know how to "start over" maybe I'll rename the "Save As" for fresh test because I don't know how to get rid of this issue so I can proceed.

    EDIT:

    I disabled the SAVE LOAD - SYSTEM group, and the UNDO system doesn't work at all on my project.

    I have no idea what I did wrong even with all the organized groups it is a mess to find the issue, I can only guess it's a mess related to the JSON or whatever data these two systems work with...

    Or maybe because I use Families? (which I must)

    Creating Objects: