Alon's Recent Forum Activity

  • Why don't you just try replacing your code with what I suggested and see how it goes? Should be something like this:

    Sorry for the late reply, I appreciate your help as always :)

    The reason I use my code above and not your example is mainly because it won't solve the "outline2" issue I mentioned but only "outline" while my current code makes it work.

    Also I made that the right button won't drag to make sure won't work but only the left button.

  • Hi All,

    My project is meant to work on Desktop OS as standalone using NWJS export.

    Hopefully for Windows, Linux and Mac. for start I focus on Windows 10.

    The layout is 1920x1080 (Full HD), I have an Export Button to capture a PNG of this size.

    For now my software starts on Full Screen because this is MY current resolution.

    The thing is:

    I want to start the software on Windowed Mode with smaller resolution such as 1280x720 for example and an option for FullScreen (Window and Non-Window) to fit ANY user resolution, even 4K.

    But from a rough test, I understood that the Screen Capture will only CAPTURE the layout size based on the window size... and when I export PNG file, I get weird resolutions.

    1 - How can I make, no matter what the screen resolution is, no matter if it's windowed or full screen to CAPTURE the TRUE ORIGINAL SIZE of the Layout which is: 1920x1080

    2 - Is there a way to do this without ruin the TRUE original size? without scaling it up or down or reduce quality?

    Example of what users may ran into:

    If a user choose to work on 1280x720 windowed mode, I still want him to export 1920x1080 of the TRUE resolution of the layout, not just RESIZE it or tweak it in any way.

    Same if a user works on Full Screen of 4K or whatever strange resolution...

    3 - Is there a different way / Plugin / Addon I should use in order to accomplish this?

    Or with the current Screen Capture option but... some MAGIC code? (I'm just a C3 noob so I don't know).

  • OK, so I came up with this other simple solution which uses the left mouse button down.

    From a rough few tests it works, but anyone think it's a stable solution for my purpose, or I may ran into issues with this way later on?

    The reason I ask this because I truly not sure if I'll have problems later, but it's the only way that I could make it work (yes, I'm a C3 noob I can only do VERY basic code as you can see).

    This is my current (work for now) solution:

    Any tips / advice related to this? (based on my first thread where I describe the problem)

    Thanks ahead!

  • Thanks for the quick reply dop2000 :)

    I think I got lost trying to understand where to put your code or replace my last part of the code with it (which I tried) also I didn't understand which outline effect to use because the 2 must cancel each other when one is working like in the example when mouse cursor is over. (beside the drag issue I try to solve).

    I did some tests before I replied but they turn into guesses... which is what I made me post this thread originally.

  • Hi All,

    I have 2 Outline Effects: "Outline" (for mouse cursor OVER) and "Outline2" for Dragging.

    As you can see on the example C3 file:

    When the mouse cursor is over ANY instance of the "Created_Objects" Family it enables "Outline" effect ONLY on the TOP picked one. no more than 1 instance is affected.

    BUT! when dragging an instance while it's overlapping other instances, they will ALSO enable the effect... and this is what I would like to solve.

    I would like the same result as mouse cursor is over any instance, BUT whlie dragging, means:

    I want ONLY 1 instance to have outline at a time.

    To SEE the issue on action, just DRAG an instance OVER any other instance... as you can see, it will also act as "mouse cursor is over" which I failed to solve.

    DOWNLOAD Example C3 File

    Please have a look at the attached C3 project and try to help me out, also if you can add explanation of how you solved it, it will be very helpful for me in my learning journey while looking at your solution.

    Thanks ahead!

  • Thank you so much dop2000 everything works EXACTLY as I imagined in my rusty brain!

    I'll play with this new feature to see if I didn't miss something or made a mistake while replicating the code, because in a first rough test it works great.

    oh, one more thing: YOU ROCKS! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AsJSON sounds like a VERY useful option, thanks for the info, I'll read about it and hopefully will understand how it works in different cases.

    I tried to make the created obj TOP-Z but I failed in different tests, whatever I do makes the source instance goes TOP as well, can you please help me out here?

  • dop2000 I just noticed when holding the SHIFT it will make the source (cloned from) instance jumping to the TOP Z-Order is it possible to do the same without changing it's current Z-Depth?

    It will be useful to make the CLONED created jump to the TOP Z-Depth.

  • Thanks dop2000 it works like a charm!!

    Would you mind analyze it just so I can learn a bit about this all "JSON" thing... and the local string local variables you created temp and obj?

    I think that the JSON code is related to restore the data.. but I'm not sure and just guessing.

    You don't have to explain, I'm just curious because I have no clue what they does in this example and it'sa nice opportunity to learn it if you don't mind explain a noob.

  • Easy:

    You create a clone and continue to drag the original sprite.

    Thanks for the quick reply dop2000 :)

    I just tried this code but as I mention it's a Family "Created_Objects" and when I hold SHIFT and drag, it creates any of the Objects (different sprites) on the Family, I need it to only clone the instance.

    Any simple fix for that?

  • Hi All,

    My project use Mouse (not touch), I have a button that creates Sprite object (1 instance per click) from Family: "Created_Objects", basically I can create many instances on the layout and tweak their size, rotation, Z-Depth, change animation frame, etc..

    Each Sprite Object have X amount of frames on their default animation on speed 0 (different variations).

    How do I do this:

    When holding "SHIFT" over a specific instance and Drag it aside, it will Clone/Duplicate the instance with it's CURRENT animation frame, Rotation, Size, Z-Depth or anything that tweaked to the one I cloned FROM.

    The result should be like this:

    I create as MANY INSTANCES as I want, I tweak each one to look totally different: changing frames, Rotation, Z-Depth, Size etc.. If I will hold "SHIFT" and drag ANY OF THE INSTANCES that I already created (not just the first or last created!) it will CLONE it with it's current properties (beside the position of course which I'm dragging aside).

    HELP?

    Any visual help, screenshot or project file will be very appreciate so I can explore and try it on my project. Thanks ahead! :)

  • First of all Thank you so much for your encouraging words and mighty patience with me...

    Still, I don't think that my brain can handle C3 very well, and I'm scratching my head:

    "IT IS SOOOO SIMPLE when I think about it logically, this is ON, that one is OFF while this happen, and this is NOT happening etc.." same story, C3 Code = MESS! I'm losing my mind how can I stuck on the most basic things in C3 this is why I said I'm not smart enough, not stupid.. but not THAT smart, I just face reality not just saying it for nothing.

    Anyway...

    I just made the code much longer now with the new ON/OFF Switch I hope that it's ok that I used instance variable for the Family instead of Global Variable, does it matter? (I'm not sure) the reason is for organized sake, nothing more. if it's an issue I will make it a Global Variable of course.

    But that's not the problem, now what I got is that it's working... kind of again.

    The dragged instance will be the only one to enable the OUTLINE effect, but... it won't if the cursor is over (without dragging) which I tried to make another event for the "Cursor is Over" but I got bad results so I just deleted it.

    Also, I believe that I didn't need the "Outline_ON" Boolean for the current code, I just made the code longer for nothing, it's the same thing... with more lines. (this is what I meant I make a mess hehe).

    I know that the problem is not in my logic thinking, it's on trying to take my logic thinking and translate it to C3 code... this is where I feel useless and my code looks like a guessing mess.

    So my feeling is that I need extra event for the "mouse cursor is over" but as I said.. it only made even more mess so I skipped it to show you the current mess.

    Sorry to failed you once again Master kidswithcrowns unfortunately the longer the code gets the more confused I get even with comments (this is why I like to separate things to Folders, beside the fact that I can use them to enable/disable which is one of the features I really like in Construct.

    DOWNLOAD - Another Failed Test

Alon's avatar

Alon

Member since 20 Feb, 2014

None one is following Alon yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies